1 https://sourceware.org/bugzilla/show_bug.cgi?id=21002
15 +#define error(status, errno, ...) \
18 + warn(__VA_ARGS__); \
19 + if (status) exit(status); \
24 #include <sys/param.h>
25 --- a/libdw/libdw_alloc.c
26 +++ b/libdw/libdw_alloc.c
27 @@ -147,5 +147,5 @@ __attribute ((noreturn)) attribute_hidde
31 - error (EXIT_FAILURE, ENOMEM, "libdw");
32 + error (EXIT_FAILURE, errno, gettext ("cannot allocate memory"));
34 --- a/libdwfl/dwfl_error.c
35 +++ b/libdwfl/dwfl_error.c
36 @@ -154,7 +154,11 @@ dwfl_errmsg (int error)
37 switch (error &~ 0xffff)
39 case OTHER_ERROR (ERRNO):
40 +#if defined(__GLIBC__) && !defined(__UCLIBC__)
41 return strerror_r (error & 0xffff, "bad", 0);
43 + return strerror (error & 0xffff);
45 case OTHER_ERROR (LIBELF):
46 return elf_errmsg (error & 0xffff);
47 case OTHER_ERROR (LIBDW):