]> xenbits.xensource.com Git - unikraft/unikraft.git/commitdiff
lib/posix-process/signals: Fix conditional for sigsetops
authorMichalis Pappas <michalis@unikraft.io>
Tue, 1 Apr 2025 05:57:45 +0000 (07:57 +0200)
committerUnikraft Bot <monkey@unikraft.io>
Thu, 17 Apr 2025 12:43:24 +0000 (12:43 +0000)
The implementation of sigsetops was conditional to HAVE_LIBC instead of
CONFIG_HAVE_LIBC, causing a build error when musl is used, due to the
definiton of sigset_t to different types. Update the conditional to fix.
Notice that this works as each flavor of libc controls both the type
and the implementation of the functions that operate on it.

Signed-off-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Sergiu Moga <sergiu@unikraft.io>
Reviewed-by: Andrei Tatar <andrei@unikraft.io>
Approved-by: Andrei Tatar <andrei@unikraft.io>
GitHub-Closes: #1626

lib/posix-process/signal/sigset.c

index f3b0463a687b156bc3c56a41542b33bc0391a0be..05882d4fb31c418e00025453b505a366e2ef6a2b 100644 (file)
@@ -11,7 +11,7 @@
 
 #include "sigset.h"
 
-#if !HAVE_LIBC
+#if !CONFIG_HAVE_LIBC
 int sigaddset(sigset_t *set, int signo)
 {
        if (unlikely(signo <= 0 || signo >= NSIG)) {
@@ -53,4 +53,4 @@ int sigismember(const sigset_t *set, int signo)
 
        return uk_sigismember(set, signo);
 }
-#endif /* !HAVE_LIBC */
+#endif /* !CONFIG_HAVE_LIBC */