diff --git a/0023-libsysprof-check-for-PERF_REG_EXTENDED_MASK-availabi.patch b/0023-libsysprof-check-for-PERF_REG_EXTENDED_MASK-availabi.patch new file mode 100644 index 0000000..975f3be --- /dev/null +++ b/0023-libsysprof-check-for-PERF_REG_EXTENDED_MASK-availabi.patch @@ -0,0 +1,29 @@ +From 83d4d630520d6db875951c301e2320bf7c28109f Mon Sep 17 00:00:00 2001 +From: Christian Hergert +Date: Fri, 8 Nov 2024 11:42:04 -0800 +Subject: [PATCH] libsysprof: check for PERF_REG_EXTENDED_MASK availability + +--- + src/libsysprof/sysprof-user-sampler.c | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/src/libsysprof/sysprof-user-sampler.c b/src/libsysprof/sysprof-user-sampler.c +index 1ae3ea27..44b4d318 100644 +--- a/src/libsysprof/sysprof-user-sampler.c ++++ b/src/libsysprof/sysprof-user-sampler.c +@@ -49,7 +49,11 @@ + #define SYSPROF_ARCH_PREFERRED_REGS DWARF_NEEDED_REGS + /* TODO: add other architectures, imitating the linux tools/perf tree */ + #else +-# define SYSPROF_ARCH_PREFERRED_REGS PERF_REG_EXTENDED_MASK ++# ifdef PERF_REG_EXTENDED_MASK ++# define SYSPROF_ARCH_PREFERRED_REGS PERF_REG_EXTENDED_MASK ++# else ++# define SYSPROF_ARCH_PREFERRED_REGS 0 ++# endif + #endif /* _ASM_{arch}_PERF_REGS_H */ + + #define N_WAKEUP_EVENTS 149 +-- +2.46.1 + diff --git a/sysprof.spec b/sysprof.spec index 39ada91..16e7138 100644 --- a/sysprof.spec +++ b/sysprof.spec @@ -42,6 +42,7 @@ Patch: 0019-sysprof-default-stack-capturing-as-enabled.patch Patch: 0020-live-unwinder-disable-test-in-build.patch Patch: 0021-sysprof-user-sampler-implement-await-for-FDs.patch Patch: 0022-sysprof-lower-libpanel-requirement.patch +Patch: 0023-libsysprof-check-for-PERF_REG_EXTENDED_MASK-availabi.patch BuildRequires: gcc BuildRequires: gcc-c++