]> granicus.if.org Git - strace/commitdiff
tests/sigaction: workaround odd libcs on alpha and mips
authorDmitry V. Levin <ldv@altlinux.org>
Wed, 2 Oct 2019 09:32:26 +0000 (09:32 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Wed, 2 Oct 2019 09:32:26 +0000 (09:32 +0000)
Apparently, some libcs define SA_RESTORER on alpha and mips
despite of the absence of sa_restorer field.  Workaround this
to match the logic implemented in decode_old_sigaction().

* tests/sigaction.c (main) [ALPHA || MIPS]: Do not check decoding
of sa_restorer field.

tests/sigaction.c

index 5cb7b9c14b8c360c4caee3cb56cc0a68ebedab59..182fdae825f61b827e4cabec5bbf198394107653 100644 (file)
@@ -157,7 +157,7 @@ main(void)
        sigdelset(mask.libc, SIGHUP);
 
        memcpy(new_act->mask, mask.old, sizeof(mask.old));
-# ifdef SA_RESTORER
+# if defined SA_RESTORER && !(defined ALPHA || defined MIPS)
        new_act->flags = SA_RESTORER;
        new_act->restorer = (unsigned long) 0xdeadfacecafef00dULL;
 #  define SA_RESTORER_FMT ", sa_flags=SA_RESTORER, sa_restorer=%#lx"