diff --git a/strace.changes b/strace.changes index ab5f421..7244170 100644 --- a/strace.changes +++ b/strace.changes @@ -17,6 +17,7 @@ Sun Mar 27 13:07:04 UTC 2022 - Andreas Schwab * Updated lists of FAN_*, IORING_*, IOSQE_*, KEY_*, KVM_*, MODULE_INIT_*, TCA_ACT_*, and *_MAGIC constants. * Updated lists of ioctl commands from Linux 5.17. +- tests-ptrace.patch: Handle undefined SEGV_PKUERR ------------------------------------------------------------------- Mon Jan 10 13:34:19 UTC 2022 - Andreas Schwab diff --git a/strace.spec b/strace.spec index c683fdb..d551f1b 100644 --- a/strace.spec +++ b/strace.spec @@ -29,6 +29,7 @@ Source: https://github.com/strace/strace/releases/download/v%{version}/% Source2: https://github.com/strace/strace/releases/download/v%{version}/%{name}-%{version}.tar.xz.asc Source3: %{name}.keyring Source4: baselibs.conf +Patch: tests-ptrace.patch BuildRequires: haveged BuildRequires: libacl-devel BuildRequires: libaio-devel @@ -58,6 +59,7 @@ and processes can be seen. Child processes can also be tracked. %prep %setup -q +%patch -p1 %build %configure \ diff --git a/tests-ptrace.patch b/tests-ptrace.patch new file mode 100644 index 0000000..8246193 --- /dev/null +++ b/tests-ptrace.patch @@ -0,0 +1,13 @@ +Index: strace-5.17/tests/ptrace.c +=================================================================== +--- strace-5.17.orig/tests/ptrace.c ++++ strace-5.17/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;