recipes: libs/ncurses: Do not use the C11 Noreturn feature for now
[dragora.git] / patches / elfutils / musl-strerror_r.patch
blobd7797e9214a42d9ee01ba2fcd7644d063d004dba
1 --- libdwfl/dwfl_error.c 2015-09-29 17:18:51.000000000 +0200
2 +++ libdwfl/dwfl_error.c 2015-11-20 05:11:29.889002058 +0100
3 @@ -154,7 +154,16 @@
4 switch (error &~ 0xffff)
6 case OTHER_ERROR (ERRNO):
7 +#if defined(__GLIBC__)
8 return strerror_r (error & 0xffff, "bad", 0);
9 +#else
10 + {
11 + static __thread char buf[128] = "";
12 + if (0 == strerror_r(error & 0xffff, buf, sizeof(buf)))
13 + return buf;
14 + }
15 + return "strerror_r() failed";
16 +#endif
17 case OTHER_ERROR (LIBELF):
18 return elf_errmsg (error & 0xffff);
19 case OTHER_ERROR (LIBDW):