summaryrefslogtreecommitdiffstats
path: root/crypto/store
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2018-07-19 15:28:34 +0200
committerAndy Polyakov <appro@openssl.org>2018-07-20 13:40:30 +0200
commitf20aa69e33a7b418e052cf210374e2267cb93a5c (patch)
tree0842b3385e60fb97eb0faf2ec2ea1653dede1aa8 /crypto/store
parentf36e9f1183b4c4947d3c71d4c31a541b96c6e3f8 (diff)
crypto/*: address standard-compilance nits.
Reviewed-by: Rich Salz <rsalz@openssl.org> Reviewed-by: Kurt Roeckx <kurt@roeckx.be> (Merged from https://github.com/openssl/openssl/pull/6745)
Diffstat (limited to 'crypto/store')
-rw-r--r--crypto/store/loader_file.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/crypto/store/loader_file.c b/crypto/store/loader_file.c
index 25ada81721..632e4511f7 100644
--- a/crypto/store/loader_file.c
+++ b/crypto/store/loader_file.c
@@ -35,6 +35,10 @@
# define stat _stat
#endif
+#ifndef S_ISDIR
+# define S_ISDIR(a) (((a) & S_IFMT) == S_IFDIR)
+#endif
+
/*-
* Password prompting
* ------------------
@@ -839,7 +843,7 @@ static OSSL_STORE_LOADER_CTX *file_open(const OSSL_STORE_LOADER *loader,
return NULL;
}
- if ((st.st_mode & S_IFDIR) == S_IFDIR) {
+ if (S_ISDIR(st.st_mode)) {
/*
* Try to copy everything, even if we know that some of them must be
* NULL for the moment. This prevents errors in the future, when more