musl libc defines its own struct ethhdr that conflicts with the kernel define one. The kernel headers provide a way to suppress its struct ethhdr. For that to work the libc headers must precede the kernel. Move the kernel linux/if_ether.h include below libc netinet/if_ether.h. That fixes the following build failure:
In file included from pppoe.h:133,
from debug.c:19:
/home/giuliobenetti/autobuild/run/instance-0/output-1/host/riscv64-buildroot-linux-musl/sysroot/usr/include/netinet/if_ether.h:116:8: error: redefinition of 'struct ethhdr'
116 | struct ethhdr {
| ^~~~~~
In file included from pppoe.h:121,
from debug.c:19:
/home/giuliobenetti/autobuild/run/instance-0/output-1/host/riscv64-buildroot-linux-musl/sysroot/usr/include/linux/if_ether.h:163:8: note: originally defined here
163 | struct ethhdr {
| ^~~~~~
musl libc defines its own
struct ethhdr
that conflicts with the kernel define one. The kernel headers provide a way to suppress itsstruct ethhdr
. For that to work the libc headers must precede the kernel. Move the kernellinux/if_ether.h
include below libcnetinet/if_ether.h
. That fixes the following build failure:Fixes:
Signed-off-by: Fabrice Fontaine fontaine.fabrice@gmail.com