Commit 45d573a8 authored by Mike Frysinger's avatar Mike Frysinger

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 \
	-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.
Reported-by: 's avatarRandy MacLeod <>
parent 115f1af2
......@@ -26,7 +26,6 @@
#include <sys/socket.h>
#include <sys/ioctl.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <arpa/inet.h>
#include <net/if.h>
#include <net/if_arp.h>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment