about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--sysdeps/unix/sysv/linux/s390/kernel_sigaction.h16
2 files changed, 16 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 2b1560950f..dac4fff1c3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2018-04-12  Stefan Liebler  <stli@linux.vnet.ibm.com>
+
+	* sysdeps/unix/sysv/linux/s390/kernel_sigaction.h
+	(struct kernel_sigaction): Use the same definition on 31bit as is used
+	on 64bit.
+
 2018-04-09  Florian Weimer  <fweimer@redhat.com>
 
 	[BZ #23037]
diff --git a/sysdeps/unix/sysv/linux/s390/kernel_sigaction.h b/sysdeps/unix/sysv/linux/s390/kernel_sigaction.h
index a8beaf7347..7a6a2c4f29 100644
--- a/sysdeps/unix/sysv/linux/s390/kernel_sigaction.h
+++ b/sysdeps/unix/sysv/linux/s390/kernel_sigaction.h
@@ -11,15 +11,19 @@ struct kernel_sigaction
     void (*_sa_sigaction)(int, siginfo_t *, void *);
   } _u;
 #define k_sa_handler _u._sa_handler
-#ifndef __s390x__
-  sigset_t sa_mask;
-  unsigned long sa_flags;
-  void (*sa_restorer)(void);
-#else
+  /* The 'struct sigaction' definition in s390 kernel header
+     arch/s390/include/uapi/asm/signal.h is used for __NR_rt_sigaction
+     on 64 bits and for __NR_sigaction for 31 bits.
+
+     The expected layout for __NR_rt_sigaction for 31 bits is either
+     'struct sigaction' from include/linux/signal_types.h or
+     'struct compat_sigaction' from include/linux/compat.h.
+
+     So for __NR_rt_sigaction we can use the same layout for both s390x
+     and s390.  */
   unsigned long sa_flags;
   void (*sa_restorer)(void);
   sigset_t sa_mask;
-#endif
 };
 
 #define SET_SA_RESTORER(kact, act)             \