From: Marco Schlumpp Date: Tue, 18 Apr 2023 12:55:03 +0000 (+0200) Subject: Fix the definition of the prlimit64 syscall X-Git-Tag: RELEASE-0.13.0~10 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=aab68773f4e7a3c8dcf79ad17aa9fb6587e55b69;p=unikraft%2Flibs%2Fmusl.git Fix the definition of the prlimit64 syscall 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 --- 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) +