]> git.ipfire.org Git - thirdparty/openwrt.git/commit
xdp-tools: fix musl build issues 22983/head
authorNick Hainke <vincent@systemli.org>
Sat, 18 Apr 2026 08:03:54 +0000 (10:03 +0200)
committerNick Hainke <vincent@systemli.org>
Mon, 20 Apr 2026 06:53:33 +0000 (08:53 +0200)
commitd16758d2d34a1750e19e0e8ba623583b7414c291
tree9b1d385ad35f5ad47f801560211c64f7e4602a22
parentbc391dd8ed1e334e052e909631f51e94d60954f1
xdp-tools: fix musl build issues

Add patches to fix build failures on musl-based toolchains:

0002-xdpsock-fix-struct-ethhdr-redefinition-on-musl.patch:
xdpsock.c included <net/ethernet.h> and <netinet/ether.h> alongside
<linux/if_ether.h>, triggering a struct ethhdr redefinition on musl.
Replace BSD-style ether_header/ether_addr with struct ethhdr and drop
the conflicting includes.

0003-build-use-gnu2x-to-avoid-stdbool.h-dependency.patch:
Switch CFLAGS and BPF_CFLAGS from -std=gnu11 to -std=gnu2x. In C23,
bool is a native keyword, fixing "stdbool.h: No such file or directory"
errors with a clang lacking its resource directory (e.g. llvm-bpf built
with LLVM_INSTALL_TOOLCHAIN_ONLY=ON on musl targets).

Link: https://github.com/openwrt/openwrt/pull/22983
Signed-off-by: Nick Hainke <vincent@systemli.org>
package/network/utils/xdp-tools/Makefile
package/network/utils/xdp-tools/patches/0001-params-avoid-linux-if_ether.h-in-header-to-fix-musl-.patch
package/network/utils/xdp-tools/patches/0002-xdpsock-fix-struct-ethhdr-redefinition-on-musl.patch [new file with mode: 0644]
package/network/utils/xdp-tools/patches/0003-build-use-gnu2x-to-avoid-stdbool.h-dependency.patch [new file with mode: 0644]