]> granicus.if.org Git - strace/commitdiff
hppa: fix sigaction decoding
authorMike Frysinger <vapier@gentoo.org>
Sat, 9 Aug 2014 13:04:18 +0000 (09:04 -0400)
committerDmitry V. Levin <ldv@altlinux.org>
Sat, 9 Aug 2014 15:27:55 +0000 (15:27 +0000)
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

index b501e31c7adef253072786f887dfe586a8c781c8..6a565f5a955f1b07d0a5cd0c7c7d36c2ceead496 100644 (file)
--- 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];