]> xenbits.xensource.com Git - unikraft/libs/musl.git/commitdiff
patches: Add syscall function prototype
authorEduard Vintilă <eduard.vintila47@gmail.com>
Wed, 26 Jul 2023 09:28:00 +0000 (12:28 +0300)
committerUnikraft <monkey@unikraft.io>
Wed, 9 Aug 2023 10:32:08 +0000 (10:32 +0000)
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ă <eduard.vintila47@gmail.com>
Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com>
Reviewed-by: Razvan Deaconescu <razvand@unikraft.io>
Reviewed-by: Radu Nichita <radunichita99@gmail.com>
Approved-by: Razvan Deaconescu <razvand@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #67

patches/0021-Add-syscall-function-prototype.patch [new file with mode: 0644]

diff --git a/patches/0021-Add-syscall-function-prototype.patch b/patches/0021-Add-syscall-function-prototype.patch
new file mode 100644 (file)
index 0000000..f2eb1ee
--- /dev/null
@@ -0,0 +1,35 @@
+From 301a93267aa20c0820552b7ea036111b15574946 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Eduard=20Vintil=C4=83?= <eduard.vintila47@gmail.com>
+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ă <eduard.vintila47@gmail.com>
+---
+ 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 <uk/bits/syscall_nrs.h>
++#include <uk/bits/syscall_nrs2.h>
++
++long syscall(long n, ...);
+ #endif
+-- 
+2.40.1
+