From 542d72b43b4949b3362a9c5ec929456d8bdeff13 Mon Sep 17 00:00:00 2001 From: Derek Meer Date: Thu, 20 Mar 2025 20:13:59 -0700 Subject: [PATCH] add support for getcpu() system call to pledge() This change fixes the following redbean lua tests: - `encodelua_test.lua` - `encodejson_test.lua` - `jsonorg_fail_test.lua` - `base64_test.lua` - `jsonorg_pass_test.lua` - `futex_test.lua` Without it, these tests fail with SIGSYS on Linux --- libc/calls/pledge-linux.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libc/calls/pledge-linux.c b/libc/calls/pledge-linux.c index 07df6bca7..3ea63946c 100644 --- a/libc/calls/pledge-linux.c +++ b/libc/calls/pledge-linux.c @@ -694,6 +694,7 @@ static const uint16_t kPledgeStdio[] = { __NR_linux_sched_getaffinity, // __NR_linux_sched_setaffinity, // __NR_linux_sigtimedwait, // + __NR_linux_getcpu, // }; static const uint16_t kPledgeFlock[] = {