<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">https://sourceware.org/bugzilla/show_bug.cgi?id=21002

--- a/lib/system.h
+++ b/lib/system.h
@@ -30,7 +30,18 @@
 #define LIB_SYSTEM_H	1
 
 #include &lt;errno.h&gt;
-#include &lt;error.h&gt;
+#ifdef HAVE_ERROR_H
+#include "error.h"
+#else
+#include "err.h"
+#include &lt;stdio.h&gt;
+#define error(status, errno, ...) 		\
+	do {					\
+		fflush(stdout); 		\
+		warn(__VA_ARGS__);		\
+		if (status) exit(status);	\
+	 } while(0)
+#endif
 #include &lt;stddef.h&gt;
 #include &lt;stdint.h&gt;
 #include &lt;sys/param.h&gt;
--- a/libdw/libdw_alloc.c
+++ b/libdw/libdw_alloc.c
@@ -152,5 +152,5 @@ __attribute ((noreturn)) attribute_hidde
 __libdw_oom (void)
 {
   while (1)
-    error (EXIT_FAILURE, ENOMEM, "libdw");
+    error (EXIT_FAILURE, errno, gettext ("cannot allocate memory"));
 }
--- a/libdwfl/dwfl_error.c
+++ b/libdwfl/dwfl_error.c
@@ -154,7 +154,11 @@ dwfl_errmsg (int error)
   switch (error &amp;~ 0xffff)
     {
     case OTHER_ERROR (ERRNO):
+#if defined(__GLIBC__) &amp;&amp; !defined(__UCLIBC__)
       return strerror_r (error &amp; 0xffff, "bad", 0);
+#else
+      return strerror (error &amp; 0xffff);
+#endif
     case OTHER_ERROR (LIBELF):
       return elf_errmsg (error &amp; 0xffff);
     case OTHER_ERROR (LIBDW):
</pre></body></html>