[PATCH] sigaction: fix decoding on hppa

Mike Frysinger vapier at gentoo.org
Sat Aug 9 13:04:18 UTC 2014


Since the rt_sigaction syscall on hppa doesn't have a sa_restorer,
do not include it in the kernel struct.

We also have to undefine SA_RESTORER so that code doesn't try to
use it.  The headers will export this, but the syscall doesn't
actually respect it.

* signal.c (SA_RESTORER): Undefine when HPPA is defined.
(struct new_sigaction): Disable sa_restorer on hppa.
---
 signal.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/signal.c b/signal.c
index b501e31..6a565f5 100644
--- a/signal.c
+++ b/signal.c
@@ -100,6 +100,12 @@ struct sigcontext {
 # endif
 #endif
 
+/* HPPA defines this in their headers, but doesn't actually have it,
+   so we have to delete the define.  */
+#ifdef HPPA
+# undef SA_RESTORER
+#endif
+
 #include "xlat/sigact_flags.h"
 #include "xlat/sigprocmaskcmds.h"
 
@@ -1128,9 +1134,9 @@ struct new_sigaction
 #else
 	void (*__sa_handler)(int);
 	unsigned long sa_flags;
-# ifndef ALPHA
+# if !defined(ALPHA) || !defined(HPPA)
 	void (*sa_restorer)(void);
-# endif /* !ALPHA */
+# endif /* !ALPHA || !HPPA */
 #endif /* !MIPS */
 	/* Kernel treats sa_mask as an array of longs. */
 	unsigned long sa_mask[NSIG / sizeof(long) ? NSIG / sizeof(long) : 1];
-- 
2.0.0





More information about the Strace-devel mailing list