From: Serhei Makarov Date: Fri, 13 Mar 2026 15:00:53 +0000 (-0400) Subject: libdwfl/linux-pid-attach.c PR33974: __libdwfl_set_initial_registers_thread on non... X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=da0809709ac5d3da820479015e7a9fe81b896c02;p=thirdparty%2Felfutils.git libdwfl/linux-pid-attach.c PR33974: __libdwfl_set_initial_registers_thread on non-Linux libdwfl_stacktrace uses __libdwfl_set_initial_registers_thread but it is wrapped by #ifdef __linux__, causing build errors on non-Linux platforms. * linux-pid-attach.c (__libdwfl_set_initial_registers_thread): Unwrap from the #ifdef. --- diff --git a/libdwfl/linux-pid-attach.c b/libdwfl/linux-pid-attach.c index a6e4e41a..aba62450 100644 --- a/libdwfl/linux-pid-attach.c +++ b/libdwfl/linux-pid-attach.c @@ -302,6 +302,8 @@ pid_getthread (Dwfl *dwfl __attribute__ ((unused)), pid_t tid, return true; } +#endif /* __linux__ */ + /* Implement the ebl_set_initial_registers_tid setfunc callback. */ bool @@ -327,6 +329,8 @@ __libdwfl_set_initial_registers_thread (int firstreg, unsigned nregs, return INTUSE(dwfl_thread_state_registers) (thread, firstreg, nregs, regs); } +#ifdef __linux__ + static bool pid_set_initial_registers (Dwfl_Thread *thread, void *thread_arg) { @@ -507,7 +511,9 @@ __libdwfl_get_pid_arg (Dwfl *dwfl) return NULL; } -#else /* __linux__ */ +#endif /* __linux__ */ + +#ifndef __linux__ bool internal_function