]> xenbits.xensource.com Git - unikraft/libs/newlib.git/commitdiff
bits/signal.h: Adapt to unikraft
authorCharalampos Mainas <Charalampos.Mainas@neclab.eu>
Wed, 4 Sep 2019 10:25:36 +0000 (12:25 +0200)
committerCostin Lupu <costin.lupu@cs.pub.ro>
Mon, 9 Sep 2019 12:39:57 +0000 (15:39 +0300)
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 <Charalampos.Mainas@neclab.eu>
Reviewed-by: Costin Lupu <costin.lupu@cs.pub.ro>
musl-imported/arch/x86_64/bits/signal.h

index 20cbf4aa15c2f544103579ead95f8dd5d0d363da..cae19d1e98b27ef0edb804594c352b05f0441da8 100644 (file)
@@ -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