arrfab / rpms / glibc

Forked from rpms/glibc 4 years ago
Clone

Blame SOURCES/glibc-rh1331283-2.patch

147e83
commit cb43bb0d68f001fc3d6e054d712ab8794b5fd1de
147e83
Author: Cong Wang <xiyou.wangcong@gmail.com>
147e83
Date:   Tue Jan 6 16:13:19 2015 -0800
147e83
147e83
    in.h: Coordinate in6_pktinfo and ip6_mtuinfo for kernel and glibc [BZ #15850]
147e83
    
147e83
    Similarly to what we did for in6_addr, we need a macro
147e83
    to guard in6_pktinfo and ip6_mtuinfo too.
147e83
    
147e83
    Cc: Carlos O'Donell <carlos@redhat.com>
147e83
    Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
147e83
147e83
diff --git a/inet/netinet/in.h b/inet/netinet/in.h
147e83
index bf3c8b1..f541c58 100644
147e83
--- a/inet/netinet/in.h
147e83
+++ b/inet/netinet/in.h
147e83
@@ -530,6 +530,7 @@ extern int bindresvport6 (int __sockfd, struct sockaddr_in6 *__sock_in)
147e83
 #ifdef __USE_GNU
147e83
 struct cmsghdr;			/* Forward declaration.  */
147e83
 
147e83
+#ifndef __USE_KERNEL_IPV6_DEFS
147e83
 /* IPv6 packet information.  */
147e83
 struct in6_pktinfo
147e83
   {
147e83
@@ -543,7 +544,7 @@ struct ip6_mtuinfo
147e83
     struct sockaddr_in6 ip6m_addr; /* dst address including zone ID */
147e83
     uint32_t ip6m_mtu;		   /* path MTU in host byte order */
147e83
   };
147e83
-
147e83
+#endif /* !__USE_KERNEL_IPV6_DEFS */
147e83
 
147e83
 /* Obsolete hop-by-hop and Destination Options Processing (RFC 2292).  */
147e83
 extern int inet6_option_space (int __nbytes)
147e83
diff --git a/sysdeps/unix/sysv/linux/bits/in.h b/sysdeps/unix/sysv/linux/bits/in.h
147e83
index b80a27f..b1d2cf6 100644
147e83
--- a/sysdeps/unix/sysv/linux/bits/in.h
147e83
+++ b/sysdeps/unix/sysv/linux/bits/in.h
147e83
@@ -23,10 +23,10 @@
147e83
 
147e83
 /* If the application has already included linux/in6.h from a linux-based
147e83
    kernel then we will not define the IPv6 IPPROTO_* defines, in6_addr (nor the
147e83
-   defines), sockaddr_in6, or ipv6_mreq.  The ABI used by the linux-kernel and
147e83
-   glibc match exactly.  Neither the linux kernel nor glibc should break this
147e83
-   ABI without coordination.  */
147e83
-#ifdef _UAPI_LINUX_IN6_H
147e83
+   defines), sockaddr_in6, or ipv6_mreq. Same for in6_ptkinfo or ip6_mtuinfo
147e83
+   in linux/ipv6.h. The ABI used by the linux-kernel and glibc match exactly.
147e83
+   Neither the linux kernel nor glibc should break this ABI without coordination.  */
147e83
+#if defined _UAPI_LINUX_IN6_H || defined _UAPI_IPV6_H
147e83
 /* This is not quite the same API since the kernel always defines s6_addr16 and
147e83
    s6_addr32. This is not a violation of POSIX since POSIX says "at least the
147e83
    following member" and that holds true.  */