From: Amos Jeffries Date: Sat, 1 Nov 2008 12:00:52 +0000 (+1300) Subject: Bug 2500: Solaris10/11 build fails to detect IPv6 properly X-Git-Tag: SQUID_3_2_0_1~1358 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0d7a087c1bd95fa2a45938cff6298fbdfbc83b12;p=thirdparty%2Fsquid.git Bug 2500: Solaris10/11 build fails to detect IPv6 properly --- diff --git a/configure.in b/configure.in index f46d44b387..7f4a529095 100755 --- a/configure.in +++ b/configure.in @@ -1879,6 +1879,15 @@ AC_ARG_ENABLE(ipv6, ],[AC_MSG_RESULT(yes)]) if test "$use_ipng" = "yes"; then + SAVED_LIBS="$LIBS" + dnl Solaris 10/11 requires -lsocket + case "$host" in + *-solaris*) + LIBS="$LIBS -lsocket" + ;; + *) + ;; + esac AC_CACHE_CHECK([if PF_INET6 is available], $use_ipng, AC_TRY_RUN( [ /* PF_INET6 available check */ @@ -1893,11 +1902,13 @@ if test "$use_ipng" = "yes"; then ], [ AC_MSG_RESULT(yes) use_ipng=yes + SAVED_LIBS="$LIBS" ], [ AC_MSG_RESULT(no) use_ipng=no ]) ) + LIBS="$SAVED_LIBS" fi if test "$use_ipng" = "yes"; then diff --git a/include/IPAddress.h b/include/IPAddress.h index 6152c68b12..9b0525142d 100644 --- a/include/IPAddress.h +++ b/include/IPAddress.h @@ -72,8 +72,8 @@ * UPDATE: OpenBSD 4.3 has the same. */ #if USE_IPV6 && ( defined(_SQUID_FREEBSD_) || defined(_SQUID_OPENBSD_) ) -#define s6_addr8 __u6_addr.__u6_addr8 -#define s6_addr16 __u6_addr.__u6_addr16 +//#define s6_addr8 __u6_addr.__u6_addr8 +//#define s6_addr16 __u6_addr.__u6_addr16 #define s6_addr32 __u6_addr.__u6_addr32 #endif @@ -82,6 +82,12 @@ #define IPV6_V6ONLY 27 // from OpenBSD 4.3 headers. (NP: does not match non-BSD OS values) #endif +/* Bug 2500: Solaris 10/11 require s6_addr* defines. */ +#if USE_IPV6 && defined(_SQUID_SOLARIS_) +//#define s6_addr8 _S6_un._S6_u8 +//#define s6_addr16 _S6_un._S6_u16 +#define s6_addr32 _S6_un._S6_u32 +#endif /// Length of buffer that needs to be allocated to old a null-terminated IP-string // Yuck. But there are still structures that need it to be an 'integer constant'.