From: Khem Raj Date: Thu, 11 Aug 2022 05:54:33 +0000 (-0700) Subject: iproute2: Fix netns check during configure X-Git-Tag: lucaceresoli/bug-15201-perf-libtraceevent-missing~3294 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f820e177f9d1d1f1c3c9411003e44d04961e1ba4;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git iproute2: Fix netns check during configure Check would fail with compilers using -Werror since _GNU_SOURCE is needed for this function. Signed-off-by: Khem Raj Signed-off-by: Alexandre Belloni --- diff --git a/meta/recipes-connectivity/iproute2/iproute2/0001-configure-Define-_GNU_SOURCE-when-checking-for-setns.patch b/meta/recipes-connectivity/iproute2/iproute2/0001-configure-Define-_GNU_SOURCE-when-checking-for-setns.patch new file mode 100644 index 00000000000..04d44ef4442 --- /dev/null +++ b/meta/recipes-connectivity/iproute2/iproute2/0001-configure-Define-_GNU_SOURCE-when-checking-for-setns.patch @@ -0,0 +1,28 @@ +From dc837a6b4c2cad7f31cddfe56cd652e26baadc02 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Wed, 10 Aug 2022 22:31:03 -0700 +Subject: [PATCH] configure: Define _GNU_SOURCE when checking for setns + +glibc defines this function only as gnu extention + +Upstream-Status: Submitted [https://lore.kernel.org/netdev/20220811053440.778649-1-raj.khem@gmail.com/T/#u] +Signed-off-by: Khem Raj +--- + configure | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/configure b/configure +index 440facb..c02753b 100755 +--- a/configure ++++ b/configure +@@ -191,6 +191,7 @@ check_ipt_lib_dir() + check_setns() + { + cat >$TMPDIR/setnstest.c < + int main(int argc, char **argv) + { +-- +2.37.1 + diff --git a/meta/recipes-connectivity/iproute2/iproute2_5.19.0.bb b/meta/recipes-connectivity/iproute2/iproute2_5.19.0.bb index c45920b0158..6a007797c95 100644 --- a/meta/recipes-connectivity/iproute2/iproute2_5.19.0.bb +++ b/meta/recipes-connectivity/iproute2/iproute2_5.19.0.bb @@ -3,6 +3,7 @@ require iproute2.inc SRC_URI = "${KERNELORG_MIRROR}/linux/utils/net/${BPN}/${BP}.tar.xz \ file://0001-libc-compat.h-add-musl-workaround.patch \ file://0001-ip-ipstats.c-add-an-include-where-MIN-is-defined.patch \ + file://0001-configure-Define-_GNU_SOURCE-when-checking-for-setns.patch \ " SRC_URI[sha256sum] = "26b7a34d6a7fd2f7a42e2b39c5a90cb61bac522d1096067ffeb195e5693d7791"