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 a5b2b7f1624beb8ca43d5da257ec41e333570b77..3ee6bf5a162e13788b0f1f820fde2e9f45ff42bb 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;