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