diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/libssl/src/apps/apps.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/src/lib/libssl/src/apps/apps.c b/src/lib/libssl/src/apps/apps.c index 3a6c3b9bdd..7c0b087a9e 100644 --- a/src/lib/libssl/src/apps/apps.c +++ b/src/lib/libssl/src/apps/apps.c | |||
| @@ -109,15 +109,17 @@ | |||
| 109 | * | 109 | * |
| 110 | */ | 110 | */ |
| 111 | 111 | ||
| 112 | #include <sys/types.h> | ||
| 113 | #include <sys/stat.h> | ||
| 112 | #include <stdio.h> | 114 | #include <stdio.h> |
| 113 | #include <stdlib.h> | 115 | #include <stdlib.h> |
| 114 | #include <string.h> | 116 | #include <string.h> |
| 115 | #include <strings.h> | 117 | #include <strings.h> |
| 116 | #include <sys/types.h> | ||
| 117 | #include <ctype.h> | 118 | #include <ctype.h> |
| 118 | #include <errno.h> | 119 | #include <errno.h> |
| 119 | #include <assert.h> | 120 | #include <assert.h> |
| 120 | #include <unistd.h> | 121 | #include <unistd.h> |
| 122 | |||
| 121 | #include <openssl/err.h> | 123 | #include <openssl/err.h> |
| 122 | #include <openssl/x509.h> | 124 | #include <openssl/x509.h> |
| 123 | #include <openssl/x509v3.h> | 125 | #include <openssl/x509v3.h> |
| @@ -2489,27 +2491,13 @@ app_tminterval(int stop, int usertime) | |||
| 2489 | } | 2491 | } |
| 2490 | #endif | 2492 | #endif |
| 2491 | 2493 | ||
| 2492 | /* app_isdir section */ | ||
| 2493 | #include <sys/stat.h> | ||
| 2494 | #ifndef S_ISDIR | ||
| 2495 | #if defined(_S_IFMT) && defined(_S_IFDIR) | ||
| 2496 | #define S_ISDIR(a) (((a) & _S_IFMT) == _S_IFDIR) | ||
| 2497 | #else | ||
| 2498 | #define S_ISDIR(a) (((a) & S_IFMT) == S_IFDIR) | ||
| 2499 | #endif | ||
| 2500 | #endif | ||
| 2501 | 2494 | ||
| 2502 | int | 2495 | int |
| 2503 | app_isdir(const char *name) | 2496 | app_isdir(const char *name) |
| 2504 | { | 2497 | { |
| 2505 | #if defined(S_ISDIR) | ||
| 2506 | struct stat st; | 2498 | struct stat st; |
| 2507 | 2499 | ||
| 2508 | if (stat(name, &st) == 0) | 2500 | if (stat(name, &st) == 0) |
| 2509 | return S_ISDIR(st.st_mode); | 2501 | return S_ISDIR(st.st_mode); |
| 2510 | else | 2502 | return -1; |
| 2511 | return -1; | ||
| 2512 | #else | ||
| 2513 | return -1; | ||
| 2514 | #endif | ||
| 2515 | } | 2503 | } |
