Replaced the strange definitions of IN6ADDR_ANY_INIT and IN6ADDR_LOOPBACK_INIT on...
authorTobias Brunner <tobias@strongswan.org>
Fri, 14 Aug 2009 11:57:07 +0000 (13:57 +0200)
committerTobias Brunner <tobias@strongswan.org>
Fri, 14 Aug 2009 12:50:49 +0000 (14:50 +0200)
src/libfreeswan/anyaddr.c

index 2e9fa27..f2eb8d0 100644 (file)
 #include "internal.h"
 #include "freeswan.h"
 
-/* these are mostly fallbacks for the no-IPv6-support-in-library case */
-#ifndef IN6ADDR_ANY_INIT
-#define        IN6ADDR_ANY_INIT        {{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }}
-#endif
-#ifndef IN6ADDR_LOOPBACK_INIT
-#define        IN6ADDR_LOOPBACK_INIT   {{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 }}
+/* OpenSolaris defines strange versions of these macros */
+#ifdef __sun
+#undef IN6ADDR_ANY_INIT
+#define        IN6ADDR_ANY_INIT                {{{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 }}}
+
+#undef IN6ADDR_LOOPBACK_INIT
+#define        IN6ADDR_LOOPBACK_INIT   {{{ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 }}}
 #endif
 
 static struct in6_addr v6any = IN6ADDR_ANY_INIT;