From: Serhei Makarov Date: Mon, 8 Sep 2025 16:10:54 +0000 (-0400) Subject: libdwfl_stacktrace: fix non-Linux build dep on PERF_SAMPLE_REGS_ABI X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9172a7aba1ad737fba0c30cd7a50f7764f213b99;p=thirdparty%2Felfutils.git libdwfl_stacktrace: fix non-Linux build dep on PERF_SAMPLE_REGS_ABI 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. --- 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 +#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"