util-linux/0007-include-mount-api-utils-include-linux-unistd.h.patch
Karel Zak e873a14a1d upgrade to upstream release v2.41
... https://www.kernel.org/pub/linux/utils/util-linux/v2.41/v2.41-ReleaseNotes
- add lastlog2 library and PAM module
- add new utils bits, coresched and lastlog2
2025-05-12 14:16:44 +02:00

40 lines
1.3 KiB
Diff

From 598b6e97f6eb90771d3e7d57135405b2f2d20843 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thomas=20Wei=C3=9Fschuh?= <thomas@t-8ch.de>
Date: Sat, 19 Apr 2025 22:02:11 +0200
Subject: 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@t-8ch.de>
(cherry picked from commit 0033f97482a7979e0de71de0a16b583e8d74dbdc)
(cherry picked from commit 7e9665e31d57d16efa304d4421eb8c9d98d8eaf1)
---
include/mount-api-utils.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/mount-api-utils.h b/include/mount-api-utils.h
index 5e1905c45..02bb326c6 100644
--- 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>
--
2.49.0