summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-03-29 02:32:10 +0100
committerSam James <sam@gentoo.org>2023-03-29 02:32:10 +0100
commiteb5fa24cb8025bab6db68cea47240a5968cd6021 (patch)
tree4de74d419d709a07e54e8762bd93586f9c9c6b80 /net-libs
parentdev-ruby/nokogiri: Stabilize 1.14.2-r1 ppc, #903489 (diff)
downloadgentoo-eb5fa24cb8025bab6db68cea47240a5968cd6021.tar.gz
gentoo-eb5fa24cb8025bab6db68cea47240a5968cd6021.tar.bz2
gentoo-eb5fa24cb8025bab6db68cea47240a5968cd6021.zip
net-libs/xdp-tools: fix build w/ musl
Closes: https://bugs.gentoo.org/836708 Thanks-to: Stijn Tintel <stijn@linux-ipv6.be> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-libs')
-rw-r--r--net-libs/xdp-tools/files/1.3.1-musl.patch28
-rw-r--r--net-libs/xdp-tools/xdp-tools-1.3.1-r2.ebuild1
2 files changed, 29 insertions, 0 deletions
diff --git a/net-libs/xdp-tools/files/1.3.1-musl.patch b/net-libs/xdp-tools/files/1.3.1-musl.patch
new file mode 100644
index 000000000000..e3238871b262
--- /dev/null
+++ b/net-libs/xdp-tools/files/1.3.1-musl.patch
@@ -0,0 +1,28 @@
+https://bugs.gentoo.org/836708
+https://github.com/xdp-project/xdp-tools/pull/309
+
+From c9956abbfbd238bd2eb98c67ea002bfce29063a4 Mon Sep 17 00:00:00 2001
+From: Stijn Tintel <stijn@linux-ipv6.be>
+Date: Wed, 29 Mar 2023 04:25:06 +0300
+Subject: [PATCH] libxdp: fix build on musl
+
+In musl, PATH_MAX is defined in limits.h. Include it in libxdp.c to fix
+building systems using musl libc.
+
+libxdp.c: In function 'find_bpffs':
+libxdp.c:406:33: error: 'PATH_MAX' undeclared (first use in this function)
+ 406 | static char bpf_wrk_dir[PATH_MAX];
+ | ^~~~~~~~
+
+Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
+--- a/lib/libxdp/libxdp.c
++++ b/lib/libxdp/libxdp.c
+@@ -22,6 +22,7 @@
+ #include <fcntl.h>
+ #include <inttypes.h>
+ #include <dirent.h>
++#include <limits.h>
+
+ #include <linux/err.h> /* ERR_PTR */
+ #include <linux/if_link.h>
+
diff --git a/net-libs/xdp-tools/xdp-tools-1.3.1-r2.ebuild b/net-libs/xdp-tools/xdp-tools-1.3.1-r2.ebuild
index 9bc3e28993a8..543536b75ae6 100644
--- a/net-libs/xdp-tools/xdp-tools-1.3.1-r2.ebuild
+++ b/net-libs/xdp-tools/xdp-tools-1.3.1-r2.ebuild
@@ -37,6 +37,7 @@ PATCHES=(
"${FILESDIR}"/1.3.1-fix-btf__type_cnt-detection.patch
"${FILESDIR}"/1.3.1-no-Werror.patch
"${FILESDIR}"/1.3.1-xdpdump-clang.patch
+ "${FILESDIR}"/1.3.1-musl.patch
)
src_configure() {