From: Charalampos Mainas Date: Wed, 4 Sep 2019 10:25:36 +0000 (+0200) Subject: bits/signal.h: Adapt to unikraft X-Git-Tag: RELEASE-0.4~40 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=90a1211818e15793c99e3d87c07f0692887381f3;p=unikraft%2Flibs%2Fnewlib.git bits/signal.h: Adapt to unikraft struct sigaltstack is already defined from newlib's sys/signal.h which is included from ucontext.h. To avoid redinition error while compiling, struct sigaltstack definition is disabled. We also disable the SA_* and SIG* definitions since they are already defined in newlib's origin code. Signed-off-by: Charalampos Mainas Reviewed-by: Costin Lupu --- diff --git a/musl-imported/arch/x86_64/bits/signal.h b/musl-imported/arch/x86_64/bits/signal.h index 20cbf4a..cae19d1 100644 --- a/musl-imported/arch/x86_64/bits/signal.h +++ b/musl-imported/arch/x86_64/bits/signal.h @@ -60,11 +60,13 @@ typedef struct { } mcontext_t; #endif +#if 0 struct sigaltstack { void *ss_sp; int ss_flags; size_t ss_size; }; +#endif typedef struct __ucontext { unsigned long uc_flags; @@ -75,6 +77,7 @@ typedef struct __ucontext { unsigned long __fpregs_mem[64]; } ucontext_t; +#if 0 #define SA_NOCLDSTOP 1 #define SA_NOCLDWAIT 2 #define SA_SIGINFO 4 @@ -83,9 +86,11 @@ typedef struct __ucontext { #define SA_NODEFER 0x40000000 #define SA_RESETHAND 0x80000000 #define SA_RESTORER 0x04000000 +#endif #endif +#if 0 #define SIGHUP 1 #define SIGINT 2 #define SIGQUIT 3 @@ -122,3 +127,4 @@ typedef struct __ucontext { #define SIGUNUSED SIGSYS #define _NSIG 65 +#endif