Patrick Williams | c0f7c04 | 2017-02-23 20:41:17 -0600 | [diff] [blame] | 1 | From 4d56645ea144a34f7cdd3e3ede6452d81fbae251 Mon Sep 17 00:00:00 2001 |
| 2 | From: Randy MacLeod <Randy.MacLeod@windriver.com> |
| 3 | Date: Sat, 8 Oct 2016 14:42:54 +0800 |
| 4 | Subject: [PATCH] iptunnel.c: include linux/ip.h to fix building with linux-4.8 |
| 5 | |
| 6 | Fix a build error when using the linux-4.8 headers that results in: |
| 7 | |
| 8 | In file included from |
| 9 | .../sysroots/qemuarm64/usr/include/linux/if_tunnel.h:6:0, |
| 10 | from iptunnel.c:39: |
| 11 | .../qemuarm64/usr/include/linux/ip.h:85:8: error: redefinition of |
| 12 | 'struct iphdr' |
| 13 | struct iphdr { |
| 14 | ^~~~~ |
| 15 | In file included from iptunnel.c:29:0: |
| 16 | .../qemuarm64/usr/include/netinet/ip.h:44:8: note: originally defined here |
| 17 | struct iphdr |
| 18 | ^~~~~ |
| 19 | |
| 20 | Upstream-Status: Submitted [1] |
| 21 | |
| 22 | [1] https://sourceforge.net/p/net-tools/mailman/message/35413022/ |
| 23 | |
| 24 | Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com> |
| 25 | Signed-off-by: Jackie Huang <jackie.huang@windriver.com> |
| 26 | --- |
| 27 | iptunnel.c | 2 +- |
| 28 | 1 file changed, 1 insertion(+), 1 deletion(-) |
| 29 | |
| 30 | diff --git a/iptunnel.c b/iptunnel.c |
| 31 | index 4943d83..acfcbc7 100644 |
| 32 | --- a/iptunnel.c |
| 33 | +++ b/iptunnel.c |
| 34 | @@ -26,7 +26,6 @@ |
| 35 | #include <sys/socket.h> |
| 36 | #include <sys/ioctl.h> |
| 37 | #include <netinet/in.h> |
| 38 | -#include <netinet/ip.h> |
| 39 | #include <arpa/inet.h> |
| 40 | #if defined(__GLIBC__) && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)) |
| 41 | #include <net/if.h> |
| 42 | @@ -36,6 +35,7 @@ |
| 43 | #include <linux/if_arp.h> |
| 44 | #endif |
| 45 | #include <linux/types.h> |
| 46 | +#include <linux/ip.h> |
| 47 | #include <linux/if_tunnel.h> |
| 48 | |
| 49 | #include "config.h" |
| 50 | -- |
| 51 | 2.8.3 |
| 52 | |