I'm trying to build busybox with musl with the headers from linux 4.4.3 but I'm getting a lot of error: redefinition
stuff.
CC libbb/udp_io.o
CC networking/libiproute/iprule.o
CC networking/tcpudp.o
CC libbb/unicode.o
In file included from /opt/lfs/build/musl-build/include/netdb.h:9:0,
from include/libbb.h:20,
from networking/tcpudp.c:69:
/opt/lfs/build/musl-build/include/linux/in.h:28:3: error: expected identifier before numeric constant
IPPROTO_IP = 0, /* Dummy protocol for TCP */
^
In file included from /opt/lfs/build/musl-build/include/linux/netfilter.h:7:0,
from /opt/lfs/build/musl-build/include/linux/netfilter_ipv4.h:8,
from networking/tcpudp.c:74:
/opt/lfs/build/musl-build/include/linux/in.h:84:8: error: redefinition of ‘struct in_addr’
struct in_addr {
^
In file included from /opt/lfs/build/musl-build/include/netdb.h:9:0,
from include/libbb.h:20,
from networking/tcpudp.c:69:
/opt/lfs/build/musl-build/include/netinet/in.h:14:8: note: originally defined here
struct in_addr { in_addr_t s_addr; };
^
In file included from /opt/lfs/build/musl-build/include/linux/netfilter.h:7:0,
from /opt/lfs/build/musl-build/include/linux/netfilter_ipv4.h:8,
from networking/tcpudp.c:74:
/opt/lfs/build/musl-build/include/linux/in.h:166:8: error: redefinition of ‘struct ip_mreq’
struct ip_mreq {
^
In file included from /opt/lfs/build/musl-build/include/netdb.h:9:0,
from include/libbb.h:20,
from networking/tcpudp.c:69:
/opt/lfs/build/musl-build/include/netinet/in.h:248:8: note: originally defined here
struct ip_mreq
^
In file included from /opt/lfs/build/musl-build/include/linux/netfilter.h:7:0,
from /opt/lfs/build/musl-build/include/linux/netfilter_ipv4.h:8,
from networking/tcpudp.c:74:
/opt/lfs/build/musl-build/include/linux/in.h:171:8: error: redefinition of ‘struct ip_mreqn’
struct ip_mreqn {
^
In file included from /opt/lfs/build/musl-build/include/netdb.h:9:0,
from include/libbb.h:20,
from networking/tcpudp.c:69:
/opt/lfs/build/musl-build/include/netinet/in.h:254:8: note: originally defined here
struct ip_mreqn
^
In file included from /opt/lfs/build/musl-build/include/linux/netfilter.h:7:0,
from /opt/lfs/build/musl-build/include/linux/netfilter_ipv4.h:8,
from networking/tcpudp.c:74:
/opt/lfs/build/musl-build/include/linux/in.h:177:8: error: redefinition of ‘struct ip_mreq_source’
struct ip_mreq_source {
^
In file included from /opt/lfs/build/musl-build/include/netdb.h:9:0,
from include/libbb.h:20,
from networking/tcpudp.c:69:
/opt/lfs/build/musl-build/include/netinet/in.h:261:8: note: originally defined here
struct ip_mreq_source {
^
In file included from /opt/lfs/build/musl-build/include/linux/netfilter.h:7:0,
from /opt/lfs/build/musl-build/include/linux/netfilter_ipv4.h:8,
from networking/tcpudp.c:74:
/opt/lfs/build/musl-build/include/linux/in.h:183:8: error: redefinition of ‘struct ip_msfilter’
struct ip_msfilter {
^
In file included from /opt/lfs/build/musl-build/include/netdb.h:9:0,
from include/libbb.h:20,
from networking/tcpudp.c:69:
/opt/lfs/build/musl-build/include/netinet/in.h:267:8: note: originally defined here
struct ip_msfilter {
^
In file included from /opt/lfs/build/musl-build/include/linux/netfilter.h:7:0,
from /opt/lfs/build/musl-build/include/linux/netfilter_ipv4.h:8,
from networking/tcpudp.c:74:
/opt/lfs/build/musl-build/include/linux/in.h:195:8: error: redefinition of ‘struct group_req’
struct group_req {
^
In file included from /opt/lfs/build/musl-build/include/netdb.h:9:0,
from include/libbb.h:20,
from networking/tcpudp.c:69:
/opt/lfs/build/musl-build/include/netinet/in.h:278:8: note: originally defined here
struct group_req {
^
In file included from /opt/lfs/build/musl-build/include/linux/netfilter.h:7:0,
from /opt/lfs/build/musl-build/include/linux/netfilter_ipv4.h:8,
from networking/tcpudp.c:74:
/opt/lfs/build/musl-build/include/linux/in.h:200:8: error: redefinition of ‘struct group_source_req’
struct group_source_req {
^
In file included from /opt/lfs/build/musl-build/include/netdb.h:9:0,
from include/libbb.h:20,
from networking/tcpudp.c:69:
/opt/lfs/build/musl-build/include/netinet/in.h:283:8: note: originally defined here
struct group_source_req {
^
In file included from /opt/lfs/build/musl-build/include/linux/netfilter.h:7:0,
from /opt/lfs/build/musl-build/include/linux/netfilter_ipv4.h:8,
from networking/tcpudp.c:74:
/opt/lfs/build/musl-build/include/linux/in.h:206:8: error: redefinition of ‘struct group_filter’
struct group_filter {
^
In file included from /opt/lfs/build/musl-build/include/netdb.h:9:0,
from include/libbb.h:20,
from networking/tcpudp.c:69:
/opt/lfs/build/musl-build/include/netinet/in.h:289:8: note: originally defined here
struct group_filter {
^
In file included from /opt/lfs/build/musl-build/include/linux/netfilter.h:7:0,
from /opt/lfs/build/musl-build/include/linux/netfilter_ipv4.h:8,
from networking/tcpudp.c:74:
/opt/lfs/build/musl-build/include/linux/in.h:220:8: error: redefinition of ‘struct in_pktinfo’
struct in_pktinfo {
^
In file included from /opt/lfs/build/musl-build/include/netdb.h:9:0,
from include/libbb.h:20,
from networking/tcpudp.c:69:
/opt/lfs/build/musl-build/include/netinet/in.h:300:8: note: originally defined here
struct in_pktinfo
^
In file included from /opt/lfs/build/musl-build/include/linux/netfilter.h:7:0,
from /opt/lfs/build/musl-build/include/linux/netfilter_ipv4.h:8,
from networking/tcpudp.c:74:
/opt/lfs/build/musl-build/include/linux/in.h:230:8: error: redefinition of ‘struct sockaddr_in’
struct sockaddr_in {
^
In file included from /opt/lfs/build/musl-build/include/netdb.h:9:0,
from include/libbb.h:20,
from networking/tcpudp.c:69:
/opt/lfs/build/musl-build/include/netinet/in.h:16:8: note: originally defined here
struct sockaddr_in
^
make[1]: *** [networking/tcpudp.o] Error 1
make: *** [networking] Error 2
make: *** Waiting for unfinished jobs....
scripts/Makefile.build:197: recipe for target 'networking/tcpudp.o' failed
Makefile:741: recipe for target 'networking' failed
CC libbb/update_passwd.o
CC networking/libiproute/iptunnel.o
CC networking/libiproute/libnetlink.o
CC libbb/utmp.o
networking/libiproute/libnetlink.c: In function ‘rtnl_dump_request’:
networking/libiproute/libnetlink.c:77:3: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
NULL, 0,
^
networking/libiproute/libnetlink.c:77:3: note: (near initialization for ‘msg.__pad1’)
networking/libiproute/libnetlink.c: In function ‘rtnl_dump_filter’:
networking/libiproute/libnetlink.c:111:4: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
NULL, 0,
^
networking/libiproute/libnetlink.c:111:4: note: (near initialization for ‘msg.__pad1’)
networking/libiproute/libnetlink.c: In function ‘rtnl_talk’:
networking/libiproute/libnetlink.c:217:3: warning: initialization makes integer from pointer without a cast [-Wint-conversion]
NULL, 0,
^
networking/libiproute/libnetlink.c:217:3: note: (near initialization for ‘msg.__pad1’)
CC libbb/uuencode.o
CC libbb/vdprintf.o
CC networking/libiproute/ll_addr.o
CC libbb/verror_msg.o
CC networking/libiproute/ll_map.o
CC networking/libiproute/ll_proto.o
CC libbb/vfork_daemon_rexec.o
CC networking/libiproute/ll_types.o
CC libbb/warn_ignoring_args.o
CC networking/libiproute/rt_names.o
CC networking/libiproute/rtm_map.o
CC libbb/wfopen.o
CC libbb/wfopen_input.o
CC libbb/write.o
CC networking/libiproute/utils.o
CC libbb/xatonum.o
CC libbb/xconnect.o
AR networking/libiproute/lib.a
CC libbb/xfunc_die.o
CC libbb/xfuncs.o
CC libbb/xfuncs_printf.o
CC libbb/xgetcwd.o
CC libbb/xgethostbyname.o
CC libbb/xreadlink.o
CC libbb/xrealloc_vector.o
CC libbb/xregcomp.o
AR libbb/lib.a
is there any way to fix this by not patching every linux header for every linux verion to not duplicate definitions?