[File] [PATCH 1/2] seccomp: undef pread64 to fix the build with musl
Yegor Yefremov
yegorslists at googlemail.com
Tue Nov 3 00:00:38 EST 2026
Since 5.48, seccomp.c includes <unistd.h>. With _LARGEFILE64_SOURCE,
musl's unistd.h does
#define pread64 pread
which turns ALLOW_RULE(pread64) into SCMP_SYS(pread), which does not
exist:
seccomp.c:53:52: error: '__SNR_pread' undeclared (first use in this function)
Undefine the macro before using it. The same musl issue affects
fstatat64 (bug 473).
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Yegor Yefremov <yegorslists at googlemail.com>
---
src/seccomp.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/seccomp.c b/src/seccomp.c
index f867abcf..ea27a3a8 100644
--- a/src/seccomp.c
+++ b/src/seccomp.c
@@ -178,6 +178,7 @@ enable_sandbox(int flags, int action)
SCMP_CMP(2, SCMP_CMP_MASKED_EQ, O_RDWR, O_RDWR)) == -1)
goto out;
}
+#undef pread64
ALLOW_RULE(pread64);
ALLOW_RULE(read);
ALLOW_RULE(readlink);
--
2.34.1
More information about the File
mailing list