From 914f79ba450d8f2b79c79d9ddcddf5b0bea8af28 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Thu, 25 Mar 2004 20:01:03 +0000 Subject: [PATCH] Wrap code starting with a definition. PR: 854 --- crypto/rand/randfile.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/crypto/rand/randfile.c b/crypto/rand/randfile.c index f64c7383b2..767d2c70d6 100644 --- a/crypto/rand/randfile.c +++ b/crypto/rand/randfile.c @@ -138,6 +138,7 @@ int RAND_write_file(const char *file) int n; #if defined(O_CREAT) && !defined(WIN32) + { /* For some reason Win32 can't write to files created this way */ /* chmod(..., 0600) is too late to protect the file, @@ -145,6 +146,7 @@ int RAND_write_file(const char *file) int fd = open(file, O_CREAT, 0600); if (fd != -1) out = fdopen(fd, "wb"); + } #endif if (out == NULL) out = fopen(file,"wb"); -- 2.25.1