LOCAL: use GNU-specific strerror_r() only if __GLIBC__ is not defined This makes musl happy. musl always chooses POSIX strerror_r(). str_error(3) suggests to use this condition: (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && ! _GNU_SOURCE but it doesn't work with musl. The only way to check is if __GLIBC__ is defined. Change-Id: I30b508be65bfabd78cdbd73f63bcb222435cbcd5
diff --git a/asio/include/asio/impl/error_code.ipp b/asio/include/asio/impl/error_code.ipp index b996773..24e7ed8 100644 --- a/asio/include/asio/impl/error_code.ipp +++ b/asio/include/asio/impl/error_code.ipp
@@ -101,7 +101,7 @@ #elif defined(__MACH__) && defined(__APPLE__) \ || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__OpenBSD__) \ || defined(_AIX) || defined(__hpux) || defined(__osf__) \ - || defined(__ANDROID__) + || defined(__ANDROID__) || !defined(__GLIBC__) char buf[256] = ""; using namespace std; strerror_r(value, buf, sizeof(buf));