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 <marco@unikraft.io>
Reviewed-by: Eduard Vintilă <eduard.vintila47@gmail.com>
Reviewed-by: Sergiu Moga <sergiu.moga@protonmail.com>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #41
--- /dev/null
+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 <sys/resource.h>
+ #include "syscall.h"
++#include <sys/resource.h>
+
+ #define FIX(x) do{ if ((x)>=SYSCALL_RLIM_INFINITY) (x)=RLIM_INFINITY; }while(0)
+