• Mike Frysinger's avatar
    iptunnel: drop netinet/ip.h include · 45d573a8
    Mike Frysinger authored
    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.
    Reported-by: default avatarRandy MacLeod <randy.macleod@windriver.com>
    45d573a8
iptunnel.c 14.9 KB