fix stack protector crashes on x32 & powerpc due to misplaced TLS canary
[musl] / arch / x86_64 / bits / signal.h
index 71b656b..e3c3141 100644 (file)
@@ -1,6 +1,11 @@
 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
  || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 
+#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
+#define MINSIGSTKSZ 2048
+#define SIGSTKSZ 8192
+#endif
+
 #ifdef _GNU_SOURCE
 #define REG_R8          0
 #define REG_R9          1
@@ -60,6 +65,12 @@ typedef struct {
 } mcontext_t;
 #endif
 
+struct sigaltstack {
+       void *ss_sp;
+       int ss_flags;
+       size_t ss_size;
+};
+
 typedef struct __ucontext {
        unsigned long uc_flags;
        struct __ucontext *uc_link;
@@ -86,6 +97,7 @@ typedef struct __ucontext {
 #define SIGILL    4
 #define SIGTRAP   5
 #define SIGABRT   6
+#define SIGIOT    SIGABRT
 #define SIGBUS    7
 #define SIGFPE    8
 #define SIGKILL   9