On Tue, Jul 09, 2024 at 01:05:45PM +0000, Joshua Lant wrote: > Error compiling with musl-libc: > The commit hash 810f8568f44f5863c2350a39f4f5c8d60f762958 introduces the > netinet/ether.h header into xtables.h, which causes an error due to the > redefinition of the ethhdr struct, defined in linux/if_ether.h and > netinet/ether.h. > > This is is a known issue with musl-libc, with kernel headers providing > guards against this happening when glibc is used: > https://wiki.musl-libc.org/faq (Q: Why am I getting “error: redefinition > of struct ethhdr/tcphdr/etc”?) > > The only value used from netinet/ether.h is ETH_ALEN, which is already set > manually in libxtables/xtables.c. Move this definition to the header and > eliminate the inclusion of netinet/if_ether.h. Any chance that musl headers are being used so this can be autodetected? Then, no option to pass -D__UAPI_DEF_ETHHDR=0 is required. thanks