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.
---
libdwfl/linux-pid-attach.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
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
--
2.52.0