aboutsummaryrefslogtreecommitdiff
path: root/crypto/conf/conf_def.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/conf/conf_def.c')
-rw-r--r--crypto/conf/conf_def.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/crypto/conf/conf_def.c b/crypto/conf/conf_def.c
index 7340a91..676540c 100644
--- a/crypto/conf/conf_def.c
+++ b/crypto/conf/conf_def.c
@@ -27,6 +27,10 @@
# endif
#endif
+#ifndef S_ISDIR
+# define S_ISDIR(a) (((a) & S_IFMT) == S_IFDIR)
+#endif
+
/*
* The maximum length we can grow a value to after variable expansion. 64k
* should be more than enough for all reasonable uses.
@@ -656,7 +660,7 @@ static BIO *process_include(char *include, OPENSSL_DIR_CTX **dirctx,
return NULL;
}
- if ((st.st_mode & S_IFDIR) == S_IFDIR) {
+ if (S_ISDIR(st.st_mode)) {
if (*dirctx != NULL) {
CONFerr(CONF_F_PROCESS_INCLUDE,
CONF_R_RECURSIVE_DIRECTORY_INCLUDE);