Skip to content

Commit

Permalink
musl-libc doesn't provide GNU version of strerror_r but uses BSD/XSI …
Browse files Browse the repository at this point in the history
…one (KhronosGroup#1911)

* harness: correct include and sort

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

Signed-off-by: David Heidelberg <[email protected]>
  • Loading branch information
okias authored Mar 18, 2024
1 parent 4c318a1 commit 77293c8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion test_common/harness/ThreadPool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
#include "mingw_compat.h"
#include <process.h>
#else // !_WIN32
#include <errno.h>
#include <pthread.h>
#include <unistd.h>
#include <sys/errno.h>
#ifdef __linux__
#include <sched.h>
#endif
Expand Down
3 changes: 2 additions & 1 deletion test_common/harness/os_helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,8 @@ static std::string _err_msg(int err, int level)
*/

#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.
#warning Not tested!
Expand Down

0 comments on commit 77293c8

Please sign in to comment.