]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
util-linux: fix build on Linux v6.18 against musl 23059/head
authorThomas Weißschuh <thomas@t-8ch.de>
Thu, 23 Apr 2026 09:27:03 +0000 (11:27 +0200)
committerRobert Marko <robimarko@gmail.com>
Fri, 24 Apr 2026 08:18:53 +0000 (10:18 +0200)
Backport an upstream patch to avoid usages of an undefined
AT_HANDLE_FID.

Closes: https://github.com/openwrt/openwrt/issues/23058
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
Link: https://github.com/openwrt/openwrt/pull/23059
Signed-off-by: Robert Marko <robimarko@gmail.com>
package/utils/util-linux/patches/0001-nsenter-Fix-AT_HANDLE_FID-on-musl.patch [new file with mode: 0644]

diff --git a/package/utils/util-linux/patches/0001-nsenter-Fix-AT_HANDLE_FID-on-musl.patch b/package/utils/util-linux/patches/0001-nsenter-Fix-AT_HANDLE_FID-on-musl.patch
new file mode 100644 (file)
index 0000000..f33ad25
--- /dev/null
@@ -0,0 +1,30 @@
+From 5452239f6e69d2d3aaa427d2d2253247cfb7cb7b Mon Sep 17 00:00:00 2001
+From: Aleksi Hannula <ahannula4+nixgit@gmail.com>
+Date: Tue, 7 Apr 2026 14:52:16 +0300
+Subject: [PATCH] nsenter: Fix AT_HANDLE_FID on musl
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Aleksi Hannula <ahannula4+nixgit@gmail.com>
+---
+ sys-utils/nsenter.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/sys-utils/nsenter.c b/sys-utils/nsenter.c
+index e10ba9cf90ab..98507958c0f1 100644
+--- a/sys-utils/nsenter.c
++++ b/sys-utils/nsenter.c
+@@ -29,6 +29,9 @@
+ #ifdef HAVE_LINUX_NSFS_H
+ # include <linux/nsfs.h>
+ #endif
++#ifndef AT_HANDLE_FID
++# define AT_HANDLE_FID 0x200
++#endif
+ #ifndef NS_GET_USERNS
+ # define NS_GET_USERNS           _IO(0xb7, 0x1)
+ #endif
+-- 
+2.53.0
+