2018-06-17 09:08:51 +00:00
|
|
|
--- a/libdw/libdw_alloc.c
|
|
|
|
+++ b/libdw/libdw_alloc.c
|
2020-07-11 18:26:14 +00:00
|
|
|
@@ -152,5 +152,5 @@ __attribute ((noreturn)) attribute_hidde
|
2015-06-14 17:43:40 +00:00
|
|
|
__libdw_oom (void)
|
|
|
|
{
|
|
|
|
while (1)
|
|
|
|
- error (EXIT_FAILURE, ENOMEM, "libdw");
|
2016-12-29 03:53:45 +00:00
|
|
|
+ error (EXIT_FAILURE, errno, gettext ("cannot allocate memory"));
|
2015-06-14 17:43:40 +00:00
|
|
|
}
|
2018-06-17 09:08:51 +00:00
|
|
|
--- a/libdwfl/dwfl_error.c
|
|
|
|
+++ b/libdwfl/dwfl_error.c
|
2022-11-02 15:18:34 +00:00
|
|
|
@@ -139,6 +139,7 @@ __libdwfl_seterrno (Dwfl_Error error)
|
2022-01-04 14:22:07 +00:00
|
|
|
static const char *
|
|
|
|
errnomsg(int error)
|
|
|
|
{
|
2020-04-06 02:02:38 +00:00
|
|
|
+#if defined(__GLIBC__) && !defined(__UCLIBC__)
|
2022-01-04 14:22:07 +00:00
|
|
|
/* Won't be changed by strerror_r, but not const so compiler doesn't throw warning */
|
|
|
|
static char unknown[] = "unknown error";
|
|
|
|
|
2022-11-02 15:18:34 +00:00
|
|
|
@@ -149,6 +150,9 @@ errnomsg(int error)
|
2022-01-04 14:22:07 +00:00
|
|
|
static __thread char msg[128];
|
|
|
|
return strerror_r (error, msg, sizeof (msg)) ? unknown : msg;
|
|
|
|
#endif
|
2020-04-06 02:02:38 +00:00
|
|
|
+#else
|
2022-01-04 14:22:07 +00:00
|
|
|
+ return strerror (error & 0xffff);
|
2020-04-06 02:02:38 +00:00
|
|
|
+#endif
|
2022-01-04 14:22:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
const char *
|