aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi
diff options
context:
space:
mode:
authorWANG Cong <xiyou.wangcong@gmail.com>2015-01-06 18:45:31 -0500
committerDavid S. Miller <davem@davemloft.net>2015-01-08 22:29:11 -0500
commit3b50d9029809b60a5081d90c282aa04d438d3ea1 (patch)
treedb50ca1e9dbe734841c07582030a75ba2d5ead05 /include/uapi
parent44d84d7272e5848878a96029b8a8b6e86854f146 (diff)
ipv6: fix redefinition of in6_pktinfo and ip6_mtuinfo
Both netinet/in.h and linux/ipv6.h define these two structs, if we include both of them, we got: /usr/include/linux/ipv6.h:19:8: error: redefinition of ‘struct in6_pktinfo’ struct in6_pktinfo { ^ In file included from /usr/include/arpa/inet.h:22:0, from txtimestamp.c:33: /usr/include/netinet/in.h:524:8: note: originally defined here struct in6_pktinfo ^ In file included from txtimestamp.c:40:0: /usr/include/linux/ipv6.h:24:8: error: redefinition of ‘struct ip6_mtuinfo’ struct ip6_mtuinfo { ^ In file included from /usr/include/arpa/inet.h:22:0, from txtimestamp.c:33: /usr/include/netinet/in.h:531:8: note: originally defined here struct ip6_mtuinfo ^ So similarly to what we did for in6_addr, we need to sync with libc header on their definitions. Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/linux/ipv6.h5
-rw-r--r--include/uapi/linux/libc-compat.h6
2 files changed, 10 insertions, 1 deletions
diff --git a/include/uapi/linux/ipv6.h b/include/uapi/linux/ipv6.h
index e863d088b9a5..b9b1b7d1c839 100644
--- a/include/uapi/linux/ipv6.h
+++ b/include/uapi/linux/ipv6.h
@@ -15,16 +15,19 @@
15 * *under construction* 15 * *under construction*
16 */ 16 */
17 17
18 18#if __UAPI_DEF_IN6_PKTINFO
19struct in6_pktinfo { 19struct in6_pktinfo {
20 struct in6_addr ipi6_addr; 20 struct in6_addr ipi6_addr;
21 int ipi6_ifindex; 21 int ipi6_ifindex;
22}; 22};
23#endif
23 24
25#if __UAPI_DEF_IP6_MTUINFO
24struct ip6_mtuinfo { 26struct ip6_mtuinfo {
25 struct sockaddr_in6 ip6m_addr; 27 struct sockaddr_in6 ip6m_addr;
26 __u32 ip6m_mtu; 28 __u32 ip6m_mtu;
27}; 29};
30#endif
28 31
29struct in6_ifreq { 32struct in6_ifreq {
30 struct in6_addr ifr6_addr; 33 struct in6_addr ifr6_addr;
diff --git a/include/uapi/linux/libc-compat.h b/include/uapi/linux/libc-compat.h
index e28807ad17fa..fa673e9cc040 100644
--- a/include/uapi/linux/libc-compat.h
+++ b/include/uapi/linux/libc-compat.h
@@ -70,6 +70,8 @@
70#define __UAPI_DEF_IPV6_MREQ 0 70#define __UAPI_DEF_IPV6_MREQ 0
71#define __UAPI_DEF_IPPROTO_V6 0 71#define __UAPI_DEF_IPPROTO_V6 0
72#define __UAPI_DEF_IPV6_OPTIONS 0 72#define __UAPI_DEF_IPV6_OPTIONS 0
73#define __UAPI_DEF_IN6_PKTINFO 0
74#define __UAPI_DEF_IP6_MTUINFO 0
73 75
74#else 76#else
75 77
@@ -84,6 +86,8 @@
84#define __UAPI_DEF_IPV6_MREQ 1 86#define __UAPI_DEF_IPV6_MREQ 1
85#define __UAPI_DEF_IPPROTO_V6 1 87#define __UAPI_DEF_IPPROTO_V6 1
86#define __UAPI_DEF_IPV6_OPTIONS 1 88#define __UAPI_DEF_IPV6_OPTIONS 1
89#define __UAPI_DEF_IN6_PKTINFO 1
90#define __UAPI_DEF_IP6_MTUINFO 1
87 91
88#endif /* _NETINET_IN_H */ 92#endif /* _NETINET_IN_H */
89 93
@@ -106,6 +110,8 @@
106#define __UAPI_DEF_IPV6_MREQ 1 110#define __UAPI_DEF_IPV6_MREQ 1
107#define __UAPI_DEF_IPPROTO_V6 1 111#define __UAPI_DEF_IPPROTO_V6 1
108#define __UAPI_DEF_IPV6_OPTIONS 1 112#define __UAPI_DEF_IPV6_OPTIONS 1
113#define __UAPI_DEF_IN6_PKTINFO 1
114#define __UAPI_DEF_IP6_MTUINFO 1
109 115
110/* Definitions for xattr.h */ 116/* Definitions for xattr.h */
111#define __UAPI_DEF_XATTR 1 117#define __UAPI_DEF_XATTR 1