+2016-06-02 Carlos O'Donell <carlos@redhat.com>
+
+ * sysdeps/unix/sysv/linux/bits/in.h [defined _UAPI_LINUX_IN6_H ||
+ defined _UAPI_IPV6_H]: Define __USE_KERNEL_IPV6_DEFS to 1.
+ [!(defined _UAPI_LINUX_IN6_H || defined _UAPI_IPV6_H)]: Define
+ __USE_KERNEL_IPV6_DEFS to 0.
+ * inet/netinet/in.h: Use '#if !__USE_KERNEL_IPV6_DEFS'.
+ Update comment.
+
2016-06-01 Florian Weimer <fweimer@redhat.com>
[BZ #19861]
IPPROTO_MAX
};
-/* If __USE_KERNEL_IPV6_DEFS is defined then the user has included the kernel
+/* If __USE_KERNEL_IPV6_DEFS is 1 then the user has included the kernel
network headers first and we should use those ABI-identical definitions
- instead of our own. */
-#ifndef __USE_KERNEL_IPV6_DEFS
+ instead of our own, otherwise 0. */
+#if !__USE_KERNEL_IPV6_DEFS
enum
{
IPPROTO_HOPOPTS = 0, /* IPv6 Hop-by-Hop options. */
#define INADDR_ALLRTRS_GROUP ((in_addr_t) 0xe0000002) /* 224.0.0.2 */
#define INADDR_MAX_LOCAL_GROUP ((in_addr_t) 0xe00000ff) /* 224.0.0.255 */
-#ifndef __USE_KERNEL_IPV6_DEFS
+#if !__USE_KERNEL_IPV6_DEFS
/* IPv6 address */
struct in6_addr
{
sizeof (struct in_addr)];
};
-#ifndef __USE_KERNEL_IPV6_DEFS
+#if !__USE_KERNEL_IPV6_DEFS
/* Ditto, for IPv6. */
struct sockaddr_in6
{
};
#endif
-#ifndef __USE_KERNEL_IPV6_DEFS
+#if !__USE_KERNEL_IPV6_DEFS
/* Likewise, for IPv6. */
struct ipv6_mreq
{
#ifdef __USE_GNU
struct cmsghdr; /* Forward declaration. */
-#ifndef __USE_KERNEL_IPV6_DEFS
+#if !__USE_KERNEL_IPV6_DEFS
/* IPv6 packet information. */
struct in6_pktinfo
{
/* This is not quite the same API since the kernel always defines s6_addr16 and
s6_addr32. This is not a violation of POSIX since POSIX says "at least the
following member" and that holds true. */
-# define __USE_KERNEL_IPV6_DEFS
+# define __USE_KERNEL_IPV6_DEFS 1
+#else
+# define __USE_KERNEL_IPV6_DEFS 0
#endif
/* Options for use with `getsockopt' and `setsockopt' at the IP level.