mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-12 14:56:53 +02:00
musl uses POSIX strerror_r, causing an int-conversion error patch the source directly instead of messing with defines
17 lines
460 B
Diff
17 lines
460 B
Diff
musl uses POSIX strerror_r
|
|
|
|
--- a/src/strerror.c
|
|
+++ b/src/strerror.c
|
|
@@ -26,12 +26,8 @@
|
|
|
|
const char* perf_strerror_r(int errnum, char* str, size_t len)
|
|
{
|
|
-#if ((_POSIX_C_SOURCE >= 200112L) && !_GNU_SOURCE) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__APPLE__)
|
|
if (strerror_r(errnum, str, len)) {
|
|
(void)snprintf(str, len, "Error %d", errnum);
|
|
}
|
|
return str;
|
|
-#else
|
|
- return strerror_r(errnum, str, len);
|
|
-#endif
|
|
}
|