aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/x509/by_dir.c
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2005-11-03 16:22:40 +0000
committerAndy Polyakov <appro@openssl.org>2005-11-03 16:22:40 +0000
commit49e3c9d8e69b92e06a9c0f8ea88853e570c235fe (patch)
tree9d6702e5477f5a7b406ac62b03436e416f03bc60 /crypto/x509/by_dir.c
parent1715e4885aecd804f22be7ac17afbbae6c154048 (diff)
downloadopenssl-49e3c9d8e69b92e06a9c0f8ea88853e570c235fe.tar.gz
Mask libcrypto references to stat with OPENSSL_NO_POSIX_IO.
Diffstat (limited to 'crypto/x509/by_dir.c')
-rw-r--r--crypto/x509/by_dir.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/crypto/x509/by_dir.c b/crypto/x509/by_dir.c
index ea689aed1a..5290970c76 100644
--- a/crypto/x509/by_dir.c
+++ b/crypto/x509/by_dir.c
@@ -65,9 +65,7 @@
#ifndef NO_SYS_TYPES_H
# include <sys/types.h>
#endif
-#ifdef MAC_OS_pre_X
-# include <stat.h>
-#else
+#ifndef OPENSSL_NO_POSIX_IO
# include <sys/stat.h>
#endif
@@ -254,7 +252,6 @@ static int get_cert_by_subject(X509_LOOKUP *xl, int type, X509_NAME *name,
int i,j,k;
unsigned long h;
BUF_MEM *b=NULL;
- struct stat st;
X509_OBJECT stmp,*tmp;
const char *postfix="";
@@ -334,8 +331,13 @@ static int get_cert_by_subject(X509_LOOKUP *xl, int type, X509_NAME *name,
postfix,k);
}
k++;
+#ifndef OPENSSL_NO_POSIX_IO
+ {
+ struct stat st;
if (stat(b->data,&st) < 0)
break;
+ }
+#endif
/* found one. */
if (type == X509_LU_X509)
{