Fix the no-posix-io option
authorMatt Caswell <matt@openssl.org>
Mon, 11 Apr 2016 12:59:31 +0000 (13:59 +0100)
committerMatt Caswell <matt@openssl.org>
Mon, 11 Apr 2016 13:33:44 +0000 (14:33 +0100)
Fix a compile failure with no-posix-io

Reviewed-by: Tim Hudson <tjh@openssl.org>
crypto/rand/randfile.c

index a5b2b7f..3ee6bf5 100644 (file)
@@ -252,7 +252,7 @@ int RAND_write_file(const char *file)
     if (out == NULL)
         goto err;
 
-#ifndef NO_CHMOD
+#if !defined(NO_CHMOD) && !defined(OPENSSL_NO_POSIX_IO)
     chmod(file, 0600);
 #endif
     n = RAND_DATA;