From b54f169bfd2e1ca39d7e16345195418ec955df4e Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Wed, 24 Jul 2013 23:56:13 +0000 Subject: [PATCH] update siginfo according to linux headers linux commit a0727e8ce513fe6890416da960181ceb10fbfae6 (2012-04-12) added siginfo fields for SIGSYS (seccomp uses it) linux commit ad5fa913991e9e0f122b021e882b0d50051fbdbc (2009-09-16) added siginfo field and si_code values for SIGBUS (hwpoison signal) --- include/signal.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/include/signal.h b/include/signal.h index ee20372b..2c3602df 100644 --- a/include/signal.h +++ b/include/signal.h @@ -67,6 +67,8 @@ extern "C" { #define BUS_ADRALN 1 #define BUS_ADRERR 2 #define BUS_OBJERR 3 +#define BUS_MCEERR_AR 4 +#define BUS_MCEERR_AO 5 #define CLD_EXITED 1 #define CLD_KILLED 2 @@ -106,11 +108,17 @@ typedef struct { } __sigchld; struct { void *si_addr; + short int si_addr_lsb; } __sigfault; struct { long si_band; int si_fd; } __sigpoll; + struct { + unsigned int si_call_addr; + int si_syscall; + unsigned int si_arch; + } __sigsys; } __si_fields; } siginfo_t; #define si_pid __si_fields.__sigchld.si_pid @@ -120,12 +128,16 @@ typedef struct { #define si_stime __si_fields.__sigchld.si_stime #define si_value __si_fields.__rt.si_sigval #define si_addr __si_fields.__sigfault.si_addr +#define si_addr_lsb __si_fields.__sigfault.si_addr_lsb #define si_band __si_fields.__sigpoll.si_band #define si_fd __si_fields.__sigpoll.si_fd #define si_timer1 __si_fields.__timer.si_timer1 #define si_timer2 __si_fields.__timer.si_timer2 #define si_ptr __si_fields.__rt.si_sigval.sival_ptr #define si_int __si_fields.__rt.si_sigval.sival_int +#define si_call_addr __si_fields.__sigsys.si_call_addr +#define si_syscall __si_fields.__sigsys.si_syscall +#define si_arch __si_fields.__sigsys.si_arch struct sigaction { union { @@ -134,7 +146,7 @@ struct sigaction { } __sa_handler; sigset_t sa_mask; int sa_flags; - void (*sa_restorer)(void); + void (*sa_restorer)(void); }; #define sa_handler __sa_handler.sa_handler #define sa_sigaction __sa_handler.sa_sigaction -- 2.25.1