blob: 52b9f2c43b7ecc6472fae16be9e127ebf8326cea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
--- 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
@@ -140,6 +140,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";
@@ -150,6 +151,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 *
|