aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Janda <siffiejoe@gmx.net>2018-12-15 10:38:42 +0100
committerPhilipp Janda <siffiejoe@gmx.net>2018-12-15 10:38:42 +0100
commit01a43c04a5afa8e48364607de57ef7c80e22d1ea (patch)
treea20453108e006b9e8f2e59734d1ee872dd5ffe95
parent71293f70f4e3180ea0659eb41a2fa5b1bd185205 (diff)
downloadlua-compat-5.3-01a43c04a5afa8e48364607de57ef7c80e22d1ea.tar.gz
lua-compat-5.3-01a43c04a5afa8e48364607de57ef7c80e22d1ea.tar.bz2
lua-compat-5.3-01a43c04a5afa8e48364607de57ef7c80e22d1ea.zip
Fix feature detection for strerror_r
Closes #44.
-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 be7f87e..42b0a4b 100644
--- a/c-api/compat-5.3.c
+++ b/c-api/compat-5.3.c
@@ -28,8 +28,9 @@
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(__GLIBC__) || defined(_POSIX_VERSION) || defined(__APPLE__) || \ 31# if (defined(_POSIX_C_SOURCE) && _POSIX_C_SOURCE >= 200112L) || \
32 (!defined (__MINGW32__) && defined(__GNUC__) && (__GNUC__ < 6)) 32 (defined(_XOPEN_SOURCE) && _XOPEN_SOURCE >= 600) || \
33 defined(__APPLE__)
33# define COMPAT53_HAVE_STRERROR_R 1 34# define COMPAT53_HAVE_STRERROR_R 1
34# else /* none of the defines matched: define to 0 */ 35# else /* none of the defines matched: define to 0 */
35# define COMPAT53_HAVE_STRERROR_R 0 36# define COMPAT53_HAVE_STRERROR_R 0