--- 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 @@ -139,6 +139,7 @@ __libdwfl_seterrno (Dwfl_Error error) static const char * errnomsg(int error) { +#if defined(__GLIBC__) && !defined(__UCLIBC__) /* Won't be changed by strerror_r, but not const so compiler doesn't throw warning */ static char unknown[] = "unknown error"; @@ -149,6 +150,9 @@ errnomsg(int error) static __thread char msg[128]; return strerror_r (error, msg, sizeof (msg)) ? unknown : msg; #endif +#else + return strerror (error & 0xffff); +#endif } const char *