#include <stddef.h>
#include <stdint.h>
#include <sys/param.h>
-@@ -38,6 +49,10 @@
- #include <byteswap.h>
- #include <unistd.h>
-
-+#ifndef __GLIBC__
-+#define canonicalize_file_name(name) realpath(name,NULL)
-+#endif
-+
- #if __BYTE_ORDER == __LITTLE_ENDIAN
- # define LE32(n) (n)
- # define LE64(n) (n)
--- a/libdw/libdw_alloc.c
+++ b/libdw/libdw_alloc.c
-@@ -73,5 +73,5 @@ __attribute ((noreturn)) attribute_hidde
+@@ -147,5 +147,5 @@ __attribute ((noreturn)) attribute_hidde
__libdw_oom (void)
{
while (1)
}
--- a/libdwfl/dwfl_error.c
+++ b/libdwfl/dwfl_error.c
-@@ -154,7 +154,7 @@ dwfl_errmsg (int error)
+@@ -154,7 +154,11 @@ dwfl_errmsg (int error)
switch (error &~ 0xffff)
{
case OTHER_ERROR (ERRNO):
-- return strerror_r (error & 0xffff, "bad", 0);
-+ return strerror_l (error & 0xffff, LC_GLOBAL_LOCALE);
++#if defined(__GLIBC__) && !defined(__UCLIBC__)
+ return strerror_r (error & 0xffff, "bad", 0);
++#else
++ return strerror (error & 0xffff);
++#endif
case OTHER_ERROR (LIBELF):
return elf_errmsg (error & 0xffff);
case OTHER_ERROR (LIBDW):