Hi Adrian,

On Mon, Nov 21, 2016 at 04:58:34PM +0200, Adrian Bunk wrote:
> On Sun, Nov 20, 2016 at 08:54:06PM +0100, Bernhard Schmidt wrote:
> >...
> > On Sat, Nov 19, 2016 at 07:43:42AM +0100, Lucas Nussbaum wrote:
> >...
> > > Relevant part (hopefully):
> > > > gcc -DHAVE_CONFIG_H -I. -I..   -Wdate-time -D_FORTIFY_SOURCE=2 -Wall -g 
> > > > -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong 
> > > > -Wformat -Werror=format-security -c -o tunnel.o tunnel.c
> > > > In file included from /usr/include/linux/if_tunnel.h:6:0,
> > > >                  from tunnel.c:23:
> > > > /usr/include/linux/ip.h:85:8: error: redefinition of 'struct iphdr'
> > > >  struct iphdr {
> > > >         ^~~~~
> > > > In file included from tunnel.c:21:0:
> > > > /usr/include/netinet/ip.h:44:8: note: originally defined here
> > > >  struct iphdr
> > > >         ^~~~~
> > > > Makefile:353: recipe for target 'tunnel.o' failed
> > > > make[3]: *** [tunnel.o] Error 1
> >...
> > Odd. I can reproduce this FTBFS. The package has not been touched for a
> > long time, does not have any uncommon builddeps and (according to the
> > reproducible builds at
> > https://tests.reproducible-builds.org/debian/rb-pkg/unstable/amd64/isatapd.html)
> > built fine in sid until a month ago.
> >...
> 
> This is caused by a recent change to the kernel userspace headers:
>   
> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=1fe8e0f074c77aa41aaa579345a9e675acbebfa9

Thanks!

I'm far away from being a C programmer, so maybe the solution is easy.
But I could not find any.

I need netinet/ip.h for the definition of IP_DF, it is not defined
anywhere else.

I obviously need linux/if_tunnel.h for all the tunnel stuff, which
includes linux/ip.h with the conflicting definition of the iphdr struct.

This works, but I don't think this is the right solution

-#include <netinet/ip.h>
 #include <net/if.h>
 #include <linux/if_tunnel.h>
+#define       IP_DF 0x4000                    /* dont fragment flag */

Bernhard

Attachment: signature.asc
Description: Digital signature

Reply via email to