summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@strace.io>2022-03-27 08:00:00 +0000
committerDmitry V. Levin <ldv@strace.io>2022-03-27 08:00:00 +0000
commit9ca5ce9833bb687af70bddea479a191295e40d08 (patch)
treed660b843591cec73955b3b48a6bd72743ddac964
parentb58206f71f1a1bbb169d61d614e98b3bf73b908d (diff)
downloadstrace-9ca5ce9833bb687af70bddea479a191295e40d08.tar.gz
tests: fix build on systems where <signal.h> does not define SEGV_PKUERR
* tests/ptrace.c (main) [HAVE_SIGINFO_T_SI_PKEY]: Conditionalize on SEGV_PKUERR as well. Reported-by: Andreas Schwab <schwab@linux-m68k.org> Fixes: v5.17~18 "tests: check decoding of SEGV_PKUERR" References: https://github.com/strace/strace/commit/beed7451b02c7c63c6199ac6b027beca7eef097f#commitcomment-69643079
-rw-r--r--tests/ptrace.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/ptrace.c b/tests/ptrace.c
index afb6bc387..00d8807d9 100644
--- a/tests/ptrace.c
+++ b/tests/ptrace.c
@@ -1854,7 +1854,7 @@ main(void)
XLAT_ARGS(PTRACE_SETSIGINFO), pid, bad_request,
XLAT_ARGS(SIGPROF), sip->si_code, sip->si_errno, errstr);
-#ifdef HAVE_SIGINFO_T_SI_PKEY
+#if defined HAVE_SIGINFO_T_SI_PKEY && defined SEGV_PKUERR
memset(sip, -1, sizeof(*sip));
sip->si_signo = SIGSEGV;
sip->si_code = SEGV_PKUERR;