aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHisham Muhammad <hisham@gobolinux.org>2022-08-01 11:18:34 -0300
committerGitHub <noreply@github.com>2022-08-01 11:18:34 -0300
commit8f8e4c6adb43e107f5902e784ef207dc3c8ca06b (patch)
tree03b7f8d48f9207c8895ad21bf471cdcc5e939a19
parenteda9b09539ce04e471cf9ce0a8d8f09ceec4ffcb (diff)
downloadlua-compat-5.3-8f8e4c6adb43e107f5902e784ef207dc3c8ca06b.tar.gz
lua-compat-5.3-8f8e4c6adb43e107f5902e784ef207dc3c8ca06b.tar.bz2
lua-compat-5.3-8f8e4c6adb43e107f5902e784ef207dc3c8ca06b.zip
strerror_r is not available on mingw (#57)
-rw-r--r--c-api/compat-5.3.c5
1 files changed, 3 insertions, 2 deletions
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 @@
28#endif /* VC++ _fsopen for share-allowed file read */ 28#endif /* VC++ _fsopen for share-allowed file read */
29 29
30#ifndef COMPAT53_HAVE_STRERROR_R 30#ifndef COMPAT53_HAVE_STRERROR_R
31# if (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L) || \ 31# if (!defined(_WIN32)) && \
32 ((defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L) || \
32 (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 600) || \ 33 (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 600) || \
33 defined(__APPLE__) 34 defined(__APPLE__))
34# define COMPAT53_HAVE_STRERROR_R 1 35# define COMPAT53_HAVE_STRERROR_R 1
35# else /* none of the defines matched: define to 0 */ 36# else /* none of the defines matched: define to 0 */
36# define COMPAT53_HAVE_STRERROR_R 0 37# define COMPAT53_HAVE_STRERROR_R 0