about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/bits/in.h
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/bits/in.h')
-rw-r--r--sysdeps/unix/sysv/linux/bits/in.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/sysdeps/unix/sysv/linux/bits/in.h b/sysdeps/unix/sysv/linux/bits/in.h
index 9bdadf3c8f..4d70a6baba 100644
--- a/sysdeps/unix/sysv/linux/bits/in.h
+++ b/sysdeps/unix/sysv/linux/bits/in.h
@@ -25,8 +25,14 @@
    kernel then we will not define the IPv6 IPPROTO_* defines, in6_addr (nor the
    defines), sockaddr_in6, or ipv6_mreq. Same for in6_ptkinfo or ip6_mtuinfo
    in linux/ipv6.h. The ABI used by the linux-kernel and glibc match exactly.
-   Neither the linux kernel nor glibc should break this ABI without coordination.  */
-#if defined _UAPI_LINUX_IN6_H || defined _UAPI_IPV6_H
+   Neither the linux kernel nor glibc should break this ABI without coordination.
+   In upstream kernel 56c176c9 the _UAPI prefix was stripped so we need to check
+   for _LINUX_IN6_H and _IPV6_H now, and keep checking the old versions for
+   maximum backwards compatibility.  */
+#if defined _UAPI_LINUX_IN6_H \
+    || defined _UAPI_IPV6_H \
+    || defined _LINUX_IN6_H \
+    || defined _IPV6_H
 /* 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.  */
@@ -209,8 +215,10 @@ struct in_pktinfo
 #define IPV6_TCLASS		67
 
 /* Obsolete synonyms for the above.  */
-#define IPV6_ADD_MEMBERSHIP	IPV6_JOIN_GROUP
-#define IPV6_DROP_MEMBERSHIP	IPV6_LEAVE_GROUP
+#if !__USE_KERNEL_IPV6_DEFS
+# define IPV6_ADD_MEMBERSHIP	IPV6_JOIN_GROUP
+# define IPV6_DROP_MEMBERSHIP	IPV6_LEAVE_GROUP
+#endif
 #define IPV6_RXHOPOPTS		IPV6_HOPOPTS
 #define IPV6_RXDSTOPTS		IPV6_DSTOPTS