Browse Source

better guard of IPV6 related stuff

Function prototypes are visible whenever IPV6 option is enabled.
Structures and constants are visible either if IPV6 is enabled
or STRICT_HEADERS is disabled.

Signed-off-by: Peter S. Mazinger <ps.m@gmx.net>
Peter S. Mazinger 13 years ago
parent
commit
b776a692f8
1 changed files with 6 additions and 3 deletions
  1. 6 3
      include/netinet/in.h

+ 6 - 3
include/netinet/in.h

@@ -213,15 +213,18 @@ struct in6_addr
 #endif
   };
 
-extern const struct in6_addr in6addr_any;        /* :: */
-extern const struct in6_addr in6addr_loopback;   /* ::1 */
-libc_hidden_proto(in6addr_loopback)
 #define IN6ADDR_ANY_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 } } }
 #define IN6ADDR_LOOPBACK_INIT { { { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 } } }
 
 #define INET6_ADDRSTRLEN 46
 #endif
 
+#ifdef __UCLIBC_HAS_IPV6__
+extern const struct in6_addr in6addr_any;        /* :: */
+extern const struct in6_addr in6addr_loopback;   /* ::1 */
+libc_hidden_proto(in6addr_loopback)
+#endif
+
 #define INET_ADDRSTRLEN 16