[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[UNIKRAFT PATCH] lib/syscall_shim: Enable UK_LIBC_SYSCALLS when library is unselected



Always enables UK_LIBC_SYSCALLS as soon as syscall_shim is
disabled. This enables all libc-style wrapper implementations of
system calls (e.g., open(), write()) when system calls are not
enabled. Those wrappers can only be disabled when syscall_shim is
selected and the hidden option LIBSYSCALL_SHIM_NOWRAPPER is set. This
is a very special case that may only be caused by some libcs that are
based on system calls and provide own libc-style wrappers (e.g., musl).

Signed-off-by: Simon Kuenzer <simon.kuenzer@xxxxxxxxx>
---
 lib/syscall_shim/include/uk/syscall.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/syscall_shim/include/uk/syscall.h 
b/lib/syscall_shim/include/uk/syscall.h
index 1be4ab91..ffa9f1ee 100644
--- a/lib/syscall_shim/include/uk/syscall.h
+++ b/lib/syscall_shim/include/uk/syscall.h
@@ -51,11 +51,11 @@
  * UK_LIBC_SYSCALLS can be set to 0 through compilation flags.
  */
 #ifndef UK_LIBC_SYSCALLS
-#if CONFIG_LIBSYSCALL_SHIM_NOWRAPPER
+#if CONFIG_LIBSYSCALL_SHIM && CONFIG_LIBSYSCALL_SHIM_NOWRAPPER
 #define UK_LIBC_SYSCALLS (0)
 #else
 #define UK_LIBC_SYSCALLS (1)
-#endif /* CONFIG_LIBSYSCALL_SHIM_NOWRAPPER */
+#endif /* CONFIG_LIBSYSCALL_SHIM && CONFIG_LIBSYSCALL_SHIM_NOWRAPPER */
 #endif /* UK_LIBC_SYSCALLS */
 
 #define __uk_scc(X) ((long) (X))
-- 
2.20.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.