Skip to content

Commit 164c143

Browse files
tk154tohojo
authored andcommitted
util/xdp_sample: remove <sys/sysinfo.h> for musl compatibility
In the musl libc environment, `<sys/sysinfo.h>` also defines the `sysinfo` struct, causing a redefinition conflict: toolchain-x86_64_gcc-14.2.0_musl/include/linux/kernel.h:5, from ../../headers/linux/hashtable.h:15, from xdp_sample.c:33: toolchain-x86_64_gcc-14.2.0_musl/include/linux/sysinfo.h:8:8: error: redefinition of 'struct sysinfo' 8 | struct sysinfo { | ^~~~~~~ In file included from xdp_sample.c:24: toolchain-x86_64_gcc-14.2.0_musl/include/sys/sysinfo.h:10:8: note: originally defined here 10 | struct sysinfo { | ^~~~~~~ This commit removes the `<sys/sysinfo.h>` include. It seems that none of its symbols are used in the xdp_sample code anyway. Signed-off-by: Til Kaiser <[email protected]>
1 parent f8a65e8 commit 164c143

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

lib/util/xdp_sample.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
#include <arpa/inet.h>
2222
#include <sys/ioctl.h>
2323
#include <bpf/libbpf.h>
24-
#include <sys/sysinfo.h>
2524
#include <sys/timerfd.h>
2625
#include <sys/utsname.h>
2726
#include <linux/limits.h>

0 commit comments

Comments
 (0)