musl-libc doesn't provide GNU version of strerror_r but uses BSD/XSI one (#1911)

* harness: correct include and sort

warning redirecting incorrect #include <sys/errno.h> to <errno.h>

Signed-off-by: David Heidelberg <david@ixit.cz>
This commit is contained in:
David Heidelberg
2024-03-18 16:37:21 +01:00
committed by GitHub
parent 4c318a1617
commit 77293c83bd
2 changed files with 3 additions and 2 deletions

View File

@@ -33,9 +33,9 @@
#include "mingw_compat.h" #include "mingw_compat.h"
#include <process.h> #include <process.h>
#else // !_WIN32 #else // !_WIN32
#include <errno.h>
#include <pthread.h> #include <pthread.h>
#include <unistd.h> #include <unistd.h>
#include <sys/errno.h>
#ifdef __linux__ #ifdef __linux__
#include <sched.h> #include <sched.h>
#endif #endif

View File

@@ -208,7 +208,8 @@ static std::string _err_msg(int err, int level)
*/ */
#if (defined(__ANDROID__) && __ANDROID_API__ < 23) \ #if (defined(__ANDROID__) && __ANDROID_API__ < 23) \
|| ((_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !_GNU_SOURCE) || ((_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !_GNU_SOURCE) \
|| (defined(_GNU_SOURCE) && !defined(__GLIBC__))
// XSI version of strerror_r. // XSI version of strerror_r.
#warning Not tested! #warning Not tested!