aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatarLibravatar daurnimator <quae@daurnimator.com> 2017-09-02 04:00:30 +1000
committerLibravatarLibravatar daurnimator <quae@daurnimator.com> 2017-09-02 04:09:56 +1000
commit16f04179e269b58ca811e1e4073e9546096a3603 (patch)
tree6ab8a7ee05c93c7672d1a416cdfa6d34a301fbe9
parentc72e19728a32af131d63ead8b0ad04e7c2f061d2 (diff)
downloadluaossl-16f04179e269b58ca811e1e4073e9546096a3603.tar.gz
luaossl-16f04179e269b58ca811e1e4073e9546096a3603.tar.bz2
luaossl-16f04179e269b58ca811e1e4073e9546096a3603.zip
Windows doesn't have S_ISDIR
-rw-r--r--src/openssl.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/openssl.c b/src/openssl.c
index 10cb1f1..726cba3 100644
--- a/src/openssl.c
+++ b/src/openssl.c
@@ -493,6 +493,10 @@
#define MIN(a, b) (((a) < (b))? (a) : (b))
#ifdef _WIN32
+#if !defined(S_ISDIR) && defined(_S_IFDIR) && defined(_S_IFDIR)
+#define S_ISDIR(m) (((m) & _S_IFDIR) == _S_IFDIR)
+#endif
+
#define stricmp(a, b) _stricmp((a), (b))
#else
#include <strings.h> /* strcasecmp(3) */