From aab68773f4e7a3c8dcf79ad17aa9fb6587e55b69 Mon Sep 17 00:00:00 2001 From: Marco Schlumpp Date: Tue, 18 Apr 2023 14:55:03 +0200 Subject: [PATCH] Fix the definition of the prlimit64 syscall MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The `sys/resource.h` header adds #define-based redirection from `prlimit64` to `prlimit` when `_GNU_SOURCE` is set. This causes our `provided_syscalls` to incorrectly define `uk_syscall_r_prlimit` instead of `uk_syscall_r_prlimit64`. By reordering, the headers we can side-step this problem. Signed-off-by: Marco Schlumpp Reviewed-by: Eduard Vintilă Reviewed-by: Sergiu Moga Approved-by: Razvan Deaconescu Tested-by: Unikraft CI GitHub-Closes: #41 --- patches/0021-prlimit64_conflict.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 patches/0021-prlimit64_conflict.patch diff --git a/patches/0021-prlimit64_conflict.patch b/patches/0021-prlimit64_conflict.patch new file mode 100644 index 0000000..a554f85 --- /dev/null +++ b/patches/0021-prlimit64_conflict.patch @@ -0,0 +1,11 @@ +diff --git a/src/linux/prlimit.c b/src/linux/prlimit.c +--- a/src/linux/prlimit.c ++++ b/src/linux/prlimit.c (date 1680775764222) +@@ -1,6 +1,6 @@ + #define _GNU_SOURCE +-#include + #include "syscall.h" ++#include + + #define FIX(x) do{ if ((x)>=SYSCALL_RLIM_INFINITY) (x)=RLIM_INFINITY; }while(0) + -- 2.39.5