From: Eduard Vintilă Date: Wed, 26 Jul 2023 09:28:00 +0000 (+0300) Subject: patches: Add syscall function prototype X-Git-Tag: RELEASE-0.14.0~7 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=2e6c8110141b2f7b853a0d48caaa5e813671949c;p=unikraft%2Flibs%2Fmusl.git patches: Add syscall function prototype The `sys/syscall.h` header is missing a declaration for the `syscall()` function, which may lead to `implicit declaration` warnings that could be treated as errors (i.e. by the GO runtime) We also include Unikraft's `syscall_nrs2.h` header which provides definitions for the `__NR_` macros needed by some libraries. Signed-off-by: Eduard Vintilă Reviewed-by: Stefan Jumarea Reviewed-by: Razvan Deaconescu Reviewed-by: Radu Nichita Approved-by: Razvan Deaconescu Tested-by: Unikraft CI GitHub-Closes: #67 --- diff --git a/patches/0021-Add-syscall-function-prototype.patch b/patches/0021-Add-syscall-function-prototype.patch new file mode 100644 index 0000000..f2eb1ee --- /dev/null +++ b/patches/0021-Add-syscall-function-prototype.patch @@ -0,0 +1,35 @@ +From 301a93267aa20c0820552b7ea036111b15574946 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Eduard=20Vintil=C4=83?= +Date: Sat, 15 Jul 2023 10:46:40 +0300 +Subject: [PATCH] patches: Add `syscall()` function prototype +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The `sys/syscall.h` header is missing a declaration for the `syscall()` +function, which may lead to `implicit declaration` warnings that could +be treated as errors (i.e. by the GO runtime) +We also include Unikraft's `syscall_nrs2.h` header which provides +definitions for the `__NR_` macros needed by some libraries. + +Signed-off-by: Eduard Vintilă +--- + include/sys/syscall.h | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/include/sys/syscall.h b/include/sys/syscall.h +index 918de59..de68f07 100644 +--- a/include/sys/syscall.h ++++ b/include/sys/syscall.h +@@ -2,5 +2,8 @@ + #define _SYS_SYSCALL_H + + #include ++#include ++ ++long syscall(long n, ...); + + #endif +-- +2.40.1 +