Reported on a GNU Hurd build of elfutils. This is a quick fix pending
my more complex patch to reduce dependency on linux perf concepts for
the libdwfl_stacktrace code.

* libdwfl_stacktrace/dwflst_perf_frame.c (perf_sample_regs_abi):
  Define this Linux enum on non-Linux platforms.
---
 libdwfl_stacktrace/dwflst_perf_frame.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/libdwfl_stacktrace/dwflst_perf_frame.c 
b/libdwfl_stacktrace/dwflst_perf_frame.c
index dc274e8e..4fc60183 100644
--- a/libdwfl_stacktrace/dwflst_perf_frame.c
+++ b/libdwfl_stacktrace/dwflst_perf_frame.c
@@ -32,6 +32,13 @@
 
 #if defined(__linux__)
 # include <linux/perf_event.h>
+#else
+/* XXX required by copy_word() below */
+enum perf_sample_regs_abi {
+    PERF_SAMPLE_REGS_ABI_NONE       = 0,
+    PERF_SAMPLE_REGS_ABI_32         = 1,
+    PERF_SAMPLE_REGS_ABI_64         = 2,
+};
 #endif
 
 #include "libdwfl_stacktraceP.h"
-- 
2.49.0

Reply via email to