[git commit nptl] in6_{pktinfo,mtuinfo}: provide type if IPV6 is on

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Fri Nov 27 09:03:24 UTC 2009


commit: http://git.uclibc.org/uClibc/commit/?id=de0b39cfc27b3a07e03af6f47c4c7e6dcf184750
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/nptl

Disable some IPv6 header defines if IPv6 is off.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
 include/netinet/in.h                |    5 +++--
 libc/sysdeps/linux/common/bits/in.h |    2 ++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/include/netinet/in.h b/include/netinet/in.h
index 06965d6..6327001 100644
--- a/include/netinet/in.h
+++ b/include/netinet/in.h
@@ -476,7 +476,7 @@ extern int bindresvport6 (int __sockfd, struct sockaddr_in6 *__sock_in)
 	 && ((((__const uint8_t *) (a))[1] & 0xf) == 0xe))
 
 
-#if 0 /*def __USE_GNU*/
+#if defined __USE_GNU && defined __UCLIBC_HAS_IPV6__
 /* IPv6 packet information.  */
 struct in6_pktinfo
   {
@@ -490,7 +490,8 @@ struct ip6_mtuinfo
     struct sockaddr_in6 ip6m_addr; /* dst address including zone ID */
     uint32_t ip6m_mtu;		   /* path MTU in host byte order */
   };
-
+#endif
+#if 0 /*def __USE_GNU*/
 
 /* Obsolete hop-by-hop and Destination Options Processing (RFC 2292).  */
 extern int inet6_option_space (int __nbytes)
diff --git a/libc/sysdeps/linux/common/bits/in.h b/libc/sysdeps/linux/common/bits/in.h
index 6880a2e..1f2b817 100644
--- a/libc/sysdeps/linux/common/bits/in.h
+++ b/libc/sysdeps/linux/common/bits/in.h
@@ -101,6 +101,7 @@ struct in_pktinfo
     struct in_addr ipi_addr;		/* Header destination address  */
   };
 
+#ifdef __UCLIBC_HAS_IPV6__
 /* Options for use with `getsockopt' and `setsockopt' at the IPv6 level.
    The first word in the comment at the right is the data type used;
    "bool" means a boolean value stored in an `int'.  */
@@ -168,3 +169,4 @@ struct in_pktinfo
 #define IPV6_RTHDR_STRICT	1	/* Hop must be a neighbour.  */
 
 #define IPV6_RTHDR_TYPE_0	0	/* IPv6 Routing header type 0.  */
+#endif /* __UCLIBC_HAS_IPV6__ */
-- 
1.6.3.3



More information about the uClibc-cvs mailing list