NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: xsrc/51494: X fails to build with MKINET6=no



The attached patch is for -current, but may also be applicable to 7.x
(except last 3 files for xorg-server.old). With this patch, I'm using
X without IPv6 support more than one year without any troubles.

Note that build with MKINET6=no fails also due to some 3rd party
software. Please refer to bin/49991. The patch for dhcpcd, attached
to that PR, is outdated. It builds and works without patch, at least
for -current. I will update that PR if you would like.

--- src/external/mit/xorg/bin/xfs/Makefile.orig	2015-07-19 01:13:54.000000000 +0900
+++ src/external/mit/xorg/bin/xfs/Makefile	2015-07-19 01:14:43.000000000 +0900
@@ -24,6 +24,10 @@
 			-I${XFSDIR}/../include \
 			-DHAVE_DAEMON
+.if ${USE_INET6} != "no"
+CPPFLAGS+=		-DIPv6=1
+.endif
+
 CONN_DEFINES=		${X11FLAGS.CONNECTION} -DFONT_t -DTRANS_SERVER \
 			-DTRANS_REOPEN -DHAS_FCHOWN -DHAS_STICKY_DIR_BIT
--- src/external/mit/xorg/server/xorg-server/os/Makefile.orig 2015-07-19 01:15:07.000000000 +0900
+++ src/external/mit/xorg/server/xorg-server/os/Makefile	2015-07-19 01:16:37.000000000 +0900
@@ -30,6 +30,10 @@
 		-DHAVE_SHA1_IN_LIBC \
 		-DMONOTONIC_CLOCK
+.if ${USE_INET6} != "no"
+CPPFLAGS+=	-DIPv6=1
+.endif
+
 .include "../Makefile.common"
.if 0
--- xsrc/external/mit/xfs/dist/os/xfstrans.c.orig	2015-07-19 01:17:45.000000000 +0900
+++ xsrc/external/mit/xfs/dist/os/xfstrans.c	2015-07-19 01:18:29.000000000 +0900
@@ -45,7 +45,7 @@
/* Fill in correct address/portnum */
     TRANS(SocketINETGetAddr)(inetdCI);
-#ifdef AF_INET6
+#if defined(IPv6) && defined(AF_INET6)
     if ( ((struct sockaddr *)(inetdCI->addr))->sa_family == AF_INET6 )
 	portnum = ntohs(((struct sockaddr_in6 *)(inetdCI->addr))->sin6_port);
     else
--- xsrc/external/mit/xfs/include/config.h.orig	2015-07-19 01:19:10.000000000 +0900
+++ xsrc/external/mit/xfs/include/config.h	2015-07-19 01:19:32.000000000 +0900
@@ -44,7 +44,7 @@
 #define HAVE_UNISTD_H 1
/* Support IPv6 for TCP connections */
-#define IPv6 1
+/* #define IPv6 1 */
/* Support os-specific local connections */
 /* #undef LOCALCONN */
--- xsrc/external/mit/xorg-server/include/dix-config.h.orig	2015-07-19 01:19:57.000000000 +0900
+++ xsrc/external/mit/xorg-server/include/dix-config.h	2015-07-19 01:20:38.000000000 +0900
@@ -248,7 +248,7 @@
 #define HAVE_VASPRINTF 1
/* Support IPv6 for TCP connections */
-#define IPv6 1
+/* #define IPv6 1 */
/* Support os-specific local connections */
 /* #undef LOCALCONN */
--- xsrc/external/mit/xorg-server/include/xorg-server.h.orig	2015-07-19 01:20:12.000000000 +0900
+++ xsrc/external/mit/xorg-server/include/xorg-server.h	2015-07-19 01:20:48.000000000 +0900
@@ -39,7 +39,7 @@
 #define HAS_SHM 1
/* Support IPv6 for TCP connections */
-#define IPv6 1
+/* #define IPv6 1 */
/* Support MIT-SHM Extension */
 #define MITSHM 1
--- src/external/mit/xorg/server/xorg-server.old/os/Makefile.orig	2016-06-28 00:38:59.098033398 +0900
+++ src/external/mit/xorg/server/xorg-server.old/os/Makefile	2016-06-28 00:39:56.670450701 +0900
@@ -30,6 +30,10 @@
 		-DHAVE_SHA1_IN_LIBC \
 		-DMONOTONIC_CLOCK
+.if ${USE_INET6} != "no"
+CPPFLAGS+=	-DIPv6=1
+.endif
+
 .include "../Makefile.common"
.if 0
--- ./xsrc/external/mit/xorg-server.old/include/dix-config.h.orig	2016-06-28 00:35:44.889054402 +0900
+++ ./xsrc/external/mit/xorg-server.old/include/dix-config.h	2016-06-28 00:36:14.271689332 +0900
@@ -248,7 +248,7 @@
 #define HAVE_VASPRINTF 1
/* Support IPv6 for TCP connections */
-#define IPv6 1
+/* #define IPv6 1 */
/* Support os-specific local connections */
 /* #undef LOCALCONN */
--- ./xsrc/external/mit/xorg-server.old/include/xorg-server.h.orig	2016-06-28 00:35:37.037473298 +0900
+++ ./xsrc/external/mit/xorg-server.old/include/xorg-server.h	2016-06-28 00:35:54.468732213 +0900
@@ -39,7 +39,7 @@
 #define HAS_SHM 1
/* Support IPv6 for TCP connections */
-#define IPv6 1
+/* #define IPv6 1 */
/* Support MIT-SHM Extension */
 #define MITSHM 1


Home | Main Index | Thread Index | Old Index