From 8f8e4c6adb43e107f5902e784ef207dc3c8ca06b Mon Sep 17 00:00:00 2001 From: Hisham Muhammad Date: Mon, 1 Aug 2022 11:18:34 -0300 Subject: strerror_r is not available on mingw (#57) --- c-api/compat-5.3.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'c-api/compat-5.3.c') diff --git a/c-api/compat-5.3.c b/c-api/compat-5.3.c index 64592d6..1901a82 100644 --- a/c-api/compat-5.3.c +++ b/c-api/compat-5.3.c @@ -28,9 +28,10 @@ #endif /* VC++ _fsopen for share-allowed file read */ #ifndef COMPAT53_HAVE_STRERROR_R -# if (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L) || \ +# if (!defined(_WIN32)) && \ + ((defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L) || \ (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 600) || \ - defined(__APPLE__) + defined(__APPLE__)) # define COMPAT53_HAVE_STRERROR_R 1 # else /* none of the defines matched: define to 0 */ # define COMPAT53_HAVE_STRERROR_R 0 -- cgit v1.2.3-55-g6feb