[openwrt/openwrt] util-linux: add include linux/unistd.h patch

LEDE Commits lede-commits at lists.infradead.org
Sun Apr 20 09:35:11 PDT 2025


hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/b96e790419238603acc3f43d4e7ff5eb23573ebc

commit b96e790419238603acc3f43d4e7ff5eb23573ebc
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Sat Apr 19 23:37:57 2025 +0200

    util-linux: add include linux/unistd.h patch
    
    If SYS_statmount/SYS_listmount is not provided by the libc,
    util-linux will fall back to __NR_statmount/__NR_listmount from the
    kernel UAPI headers.
    However it is not guaranteed that these symbols are actually visible in
    mount-api-utils.
    
    Include linux/unistd.h which provides syscall numbers.
    While this header is specific to Linux, the code is already using
    linux/mount.h.
    
    Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
    Link: https://github.com/openwrt/openwrt/pull/18539
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../patches/0100-include-linux-unistd-h.patch      | 33 ++++++++++++++++++++++
 1 file changed, 33 insertions(+)

diff --git a/package/utils/util-linux/patches/0100-include-linux-unistd-h.patch b/package/utils/util-linux/patches/0100-include-linux-unistd-h.patch
new file mode 100644
index 0000000000..eddfd96904
--- /dev/null
+++ b/package/utils/util-linux/patches/0100-include-linux-unistd-h.patch
@@ -0,0 +1,33 @@
+From 0033f97482a7979e0de71de0a16b583e8d74dbdc Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= <thomas at t-8ch.de>
+Date: Sat, 19 Apr 2025 22:02:11 +0200
+Subject: [PATCH] include/mount-api-utils: include linux/unistd.h
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+If SYS_statmount/SYS_listmount is not provided by the libc,
+util-linux will fall back to __NR_statmount/__NR_listmount from the
+kernel UAPI headers.
+However it is not guaranteed that these symbols are actually visible in
+mount-api-utils.
+
+Include linux/unistd.h which provides syscall numbers.
+While this header is specific to Linux, the code is already using
+linux/mount.h.
+
+Signed-off-by: Thomas Weißschuh <thomas at t-8ch.de>
+---
+ include/mount-api-utils.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/include/mount-api-utils.h
++++ b/include/mount-api-utils.h
+@@ -8,6 +8,7 @@
+ #ifdef HAVE_LINUX_MOUNT_H
+ #include <sys/mount.h>
+ #include <linux/mount.h>
++#include <linux/unistd.h>
+ #include <sys/syscall.h>
+ #include <inttypes.h>
+ 




More information about the lede-commits mailing list