On Sun, May 22, 2016 at 01:55:13AM +0200, Clemens Gruber wrote:
> I need some features from the new iproute2 4.6, but there seem to be
> some kernel header vs glibc header incompatibilities occuring when
> building the new iproute2 4.6 for ptxdist.
>
> Two examples of the numerous build errors on ptxdist 2016.04.0, a
> toolchain with glibc 2.22 and kernel + kernel-headers version 4.6.
>
> In file included from m_ipt.c:17:0:
> ../include/linux/if.h:106:19: error: redeclaration of enumerator 'IFF_UP'
> #define IFF_UP IFF_UP
> ^
> ../include/linux/if.h:79:2: note: previous definition of 'IFF_UP' was here
> IFF_UP = 1<<0, /* sysfs */
> ^~~~~~
>
> In file included from ../include/xtables.h:16:0,
> from ../include/iptables.h:5,
> from m_ipt.c:18:
> TOOLCHAIN/sysroot-arm-v7a-linux-gnueabihf/usr/include/net/if.h:111:8: error:
> redefinition of 'struct ifmap'
> struct ifmap
> ^~~~~
> In file included from m_ipt.c:17:0:
> ../include/linux/if.h:189:8: note: originally defined here
> struct ifmap {
> ^~~~~
>
> There is a commit in version 4.6 of iproute2, which should already have fixed
> these build errors:
> http://git.kernel.org/cgit/linux/kernel/git/shemminger/iproute2.git/commit/?id=8a781d7e2580e14f097b23a7c4731bafc800a824
>
> But somehow the problems still occur on ptxdist.
>
> Any ideas what's going on?
I think that fix only works if net/if.h is included before linux/if.h. And
that's not the case in m_ipt.c.
Regards,
Michael
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
ptxdist mailing list
[email protected]