From 629e2c6e2ec0aa33ce1be277cb32751fddea8e53 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 10 Nov 2016 18:59:19 -0500 Subject: [PATCH] iptunnel: drop netinet/ip.h include The only reason we include this header is to get the IP_DF define. However, we already have a local #define fallback in case that isn't already defined for us. Including this header while also including linux/if_tunnel.h causes problems with newer Linux headers (v4.8+): cc -O2 -g -Wall -fno-strict-aliasing -D_GNU_SOURCE \ -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE \ -I. -I/usr/local/src/net-tools/include -Ilib -c iptunnel.c In file included from /usr/include/linux/if_tunnel.h:6:0, from iptunnel.c:34: /usr/include/linux/ip.h:85:8: error: redefinition of 'struct iphdr' struct iphdr { ^ In file included from iptunnel.c:29:0: /usr/include/netinet/ip.h:44:8: note: originally defined here struct iphdr ^ Changing netinet/ip.h to linux/ip.h won't help because it doesn't provide IP_DF or anything else we care about. Simply drop the header to avoid the build failure. Change-Id: Ie8673fbeedd767c6f483008608b7a07e7e04a376 Reported-by: Randy MacLeod Source: https://sourceforge.net/p/net-tools/code/ci/45d573a89386c934d3ebac499d00c1670437813b/ --- iptunnel.c | 1 - 1 file changed, 1 deletion(-) diff --git a/iptunnel.c b/iptunnel.c index e89b3c5..68f6bdf 100644 --- a/iptunnel.c +++ b/iptunnel.c @@ -26,7 +26,6 @@ #include #include #include -#include #include #if defined(__GLIBC__) && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1)) #include -- 2.7.4