sysprof/0033-tests-fix-test-on-s390.patch
Christian Hergert c2bd8f934d build: fix a s390 test
Resolves: RHEL-65743
2024-11-13 17:18:56 -08:00

30 lines
1.0 KiB
Diff

From 08d94d9b982e5d4a6e7a67b45ae71bd51ca3fe0d Mon Sep 17 00:00:00 2001
From: Christian Hergert <chergert@redhat.com>
Date: Wed, 13 Nov 2024 17:16:44 -0800
Subject: [PATCH] tests: fix test on s390
---
src/sysprof-live-unwinder/tests/test-live-unwinder.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/sysprof-live-unwinder/tests/test-live-unwinder.c b/src/sysprof-live-unwinder/tests/test-live-unwinder.c
index c3eda85a..a0dabeb3 100644
--- a/src/sysprof-live-unwinder/tests/test-live-unwinder.c
+++ b/src/sysprof-live-unwinder/tests/test-live-unwinder.c
@@ -59,7 +59,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 */
static gboolean sample_stack;
--
2.45.2