diff --git a/crypto/o_fopen.c b/crypto/o_fopen.c index a3a006574d70a15c4e0c76d8072643ccc8cbe6d9..951d034ddaae05cc30d0d3af4aec2d01558c07be 100644 --- a/crypto/o_fopen.c +++ b/crypto/o_fopen.c @@ -12,6 +12,9 @@ #if !defined(OPENSSL_NO_STDIO) # include +# ifdef _WIN32 +# include +# endif FILE *openssl_fopen(const char *filename, const char *mode) { diff --git a/crypto/rand/randfile.c b/crypto/rand/randfile.c index d4edc50b267ec6821696e8118525d0e05d3029bf..a979eb99a259a4993c91233ee1438afd9dc9b460 100644 --- a/crypto/rand/randfile.c +++ b/crypto/rand/randfile.c @@ -26,7 +26,12 @@ # include # include # ifdef _WIN32 +# include # include +# define stat _stat +# define chmod _chmod +# define open _open +# define fdopen _fdopen # endif #endif @@ -41,13 +46,6 @@ # define S_ISREG(m) ((m) & S_IFREG) # endif -#ifdef _WIN32 -# define stat _stat -# define chmod _chmod -# define open _open -# define fdopen _fdopen -#endif - #define RAND_FILE_SIZE 1024 #define RFILE ".rnd"