]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Bug 2500: Solaris10/11 build fails to detect IPv6 properly
authorAmos Jeffries <squid3@treenet.co.nz>
Sat, 1 Nov 2008 12:00:52 +0000 (01:00 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 1 Nov 2008 12:00:52 +0000 (01:00 +1300)
configure.in
include/IPAddress.h

index f46d44b387b869e63273c71d2e939ab5c725e6b9..7f4a529095fcd9b15f52aaeca34673a604f8daa9 100755 (executable)
@@ -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
index 6152c68b1259dd3ea5299aef1c7598c112f6bd46..9b0525142d1e811dc47140c51bd9478b4620720d 100644 (file)
@@ -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
 
 #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'.