I encountered following errors when build libnl with musl: | In file included from ../../libnl-3.2.28/include/linux-private/linux/if_bridge.h:18:0, | from ../../libnl-3.2.28/lib/route/link/bridge.c:26: | /mnt/ale-build/tmp/musl/sysroots/itmk2/usr/include/linux/in6.h:32:8: error: redefinition of 'struct in6_addr' | struct in6_addr { | ^~~~~~~~ | In file included from /mnt/ale-build/tmp/musl/sysroots/itmk2/usr/include/arpa/inet.h:9:0, | from ../../libnl-3.2.28/include/netlink-private/netlink.h:33, | from ../../libnl-3.2.28/lib/route/link/bridge.c:20: | /mnt/ale-build/tmp/musl/sysroots/itmk2/usr/include/netinet/in.h:23:8: note: originally defined here | struct in6_addr { | ^~~~~~~~ | In file included from ../../libnl-3.2.28/include/linux-private/linux/if_bridge.h:18:0, | from ../../libnl-3.2.28/lib/route/link/bridge.c:26: | /mnt/ale-build/tmp/musl/sysroots/itmk2/usr/include/linux/in6.h:49:8: error: redefinition of 'struct sockaddr_in6' | struct sockaddr_in6 { | ^~~~~~~~~~~~ | In file included from /mnt/ale-build/tmp/musl/sysroots/itmk2/usr/include/arpa/inet.h:9:0, | from ../../libnl-3.2.28/include/netlink-private/netlink.h:33, | from ../../libnl-3.2.28/lib/route/link/bridge.c:20: | /mnt/ale-build/tmp/musl/sysroots/itmk2/usr/include/netinet/in.h:34:8: note: originally defined here | struct sockaddr_in6 { | ^~~~~~~~~~~~ | In file included from ../../libnl-3.2.28/include/linux-private/linux/if_bridge.h:18:0, | from ../../libnl-3.2.28/lib/route/link/bridge.c:26: | /mnt/ale-build/tmp/musl/sysroots/itmk2/usr/include/linux/in6.h:59:8: error: redefinition of 'struct ipv6_mreq' | struct ipv6_mreq { | ^~~~~~~~~ | In file included from /mnt/ale-build/tmp/musl/sysroots/itmk2/usr/include/arpa/inet.h:9:0, | from ../../libnl-3.2.28/include/netlink-private/netlink.h:33, | from ../../libnl-3.2.28/lib/route/link/bridge.c:20: | /mnt/ale-build/tmp/musl/sysroots/itmk2/usr/include/netinet/in.h:42:8: note: originally defined here | struct ipv6_mreq { | ^~~~~~~~~ | make[2]: *** [route/link/bridge.lo] Error 1 | make[2]: *** Waiting for unfinished jobs....
I think we ran into this when upgrading to the new kernel and I refreshed the linux-libc-headers to resolve it. Which linux-libc-headers are you using?
I was building it with a linux 4.6 kernel(git://github.com/Freescale/linux-fslc.git), plus the following patches back-ported from linux-libc-headers 4.8 recipe: SRC_URI_append_libc-musl = "\ file://0001-libc-compat.h-fix-some-issues-arising-from-in6.h.patch \ file://0002-libc-compat.h-prevent-redefinition-of-struct-ethhdr.patch \ file://0003-remove-inclusion-of-sysinfo.h-in-kernel.h.patch \ " when I encountered that libnl compiling issue, but as you said, I might have done something wrong in my building environment, so I can double test it, will let you know if I find something new.
Hi, I just re-tested it with the linux-libc-headers 4.8, the problem is not present with that, so maybe it's caused my wrong environment. I am closing it, sorry for the noise.