commit:     7be86a097533f3ec489851a31aa6cb749afca66f
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Aug 13 13:53:24 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat Aug 13 13:53:24 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7be86a09

sys-apps/iproute2: backport setns check fix

Could have led to a build w/o setns support.

Signed-off-by: Sam James <sam <AT> gentoo.org>

 .../files/iproute2-5.19.0-setns-check.patch        | 22 ++++++++++++++++++++++
 ...-5.19.0-r1.ebuild => iproute2-5.19.0-r2.ebuild} |  1 +
 2 files changed, 23 insertions(+)

diff --git a/sys-apps/iproute2/files/iproute2-5.19.0-setns-check.patch 
b/sys-apps/iproute2/files/iproute2-5.19.0-setns-check.patch
new file mode 100644
index 000000000000..ff97d12195e2
--- /dev/null
+++ b/sys-apps/iproute2/files/iproute2-5.19.0-setns-check.patch
@@ -0,0 +1,22 @@
+https://github.com/shemminger/iproute2/commit/d5fe96ab70928508f072a47449e9b641e46de323
+
+From d5fe96ab70928508f072a47449e9b641e46de323 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Wed, 10 Aug 2022 22:34:40 -0700
+Subject: [PATCH] configure: Define _GNU_SOURCE when checking for setns
+
+glibc defines this function only as gnu extention
+
+Signed-off-by: Khem Raj <[email protected]>
+Signed-off-by: Stephen Hemminger <[email protected]>
+--- a/configure
++++ b/configure
+@@ -191,6 +191,7 @@ check_ipt_lib_dir()
+ check_setns()
+ {
+     cat >$TMPDIR/setnstest.c <<EOF
++#define _GNU_SOURCE
+ #include <sched.h>
+ int main(int argc, char **argv)
+ {
+

diff --git a/sys-apps/iproute2/iproute2-5.19.0-r1.ebuild 
b/sys-apps/iproute2/iproute2-5.19.0-r2.ebuild
similarity index 99%
rename from sys-apps/iproute2/iproute2-5.19.0-r1.ebuild
rename to sys-apps/iproute2/iproute2-5.19.0-r2.ebuild
index 2ff11fd9105b..f0a6ca796fa7 100644
--- a/sys-apps/iproute2/iproute2-5.19.0-r1.ebuild
+++ b/sys-apps/iproute2/iproute2-5.19.0-r2.ebuild
@@ -52,6 +52,7 @@ PATCHES=(
        #"${FILESDIR}"/${PN}-5.1.0-portability.patch
        "${FILESDIR}"/${PN}-5.7.0-mix-signal.h-include.patch
        "${FILESDIR}"/${P}-musl.patch
+       "${FILESDIR}"/${P}-setns-check.patch
        "${FILESDIR}"/${PN}-default-color-auto.patch
 )
 

Reply via email to