ASR_BASE

Change-Id: Icf3719cc0afe3eeb3edc7fa80a2eb5199ca9dda1
diff --git a/package/libs/elfutils/patches/100-musl-compat.patch b/package/libs/elfutils/patches/100-musl-compat.patch
new file mode 100644
index 0000000..3fa095b
--- /dev/null
+++ b/package/libs/elfutils/patches/100-musl-compat.patch
@@ -0,0 +1,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
+@@ -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 *