From 9a359824c5e31a3aa89dc9e83c0c131fe1a1f09e Mon Sep 17 00:00:00 2001 From: deraadt Date: Mon, 21 Apr 2014 18:35:01 +0000 Subject: [PATCH] you must have S_ISDIR to play --- lib/libssl/src/apps/apps.c | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/lib/libssl/src/apps/apps.c b/lib/libssl/src/apps/apps.c index 3a6c3b9bdd9..7c0b087a9e7 100644 --- a/lib/libssl/src/apps/apps.c +++ b/lib/libssl/src/apps/apps.c @@ -109,15 +109,17 @@ * */ +#include +#include #include #include #include #include -#include #include #include #include #include + #include #include #include @@ -2489,27 +2491,13 @@ app_tminterval(int stop, int usertime) } #endif -/* app_isdir section */ -#include -#ifndef S_ISDIR -#if defined(_S_IFMT) && defined(_S_IFDIR) -#define S_ISDIR(a) (((a) & _S_IFMT) == _S_IFDIR) -#else -#define S_ISDIR(a) (((a) & S_IFMT) == S_IFDIR) -#endif -#endif int app_isdir(const char *name) { -#if defined(S_ISDIR) struct stat st; if (stat(name, &st) == 0) return S_ISDIR(st.st_mode); - else - return -1; -#else - return -1; -#endif + return -1; } -- 2.20.1