Adapt the libssl test harness testing scripts to new testing framework
[openssl.git] / crypto / rand / randfile.c
index bec7058525b6e6fe38ed56a781a77bb148350a87..e15464651c3ff2219e4a4cb315fd5a45e5e8c2e0 100644 (file)
@@ -118,7 +118,7 @@ int RAND_load_file(const char *file, long bytes)
      * if bytes == -1, read complete file.
      */
 
-    MS_STATIC unsigned char buf[BUFSIZE];
+    unsigned char buf[BUFSIZE];
 #ifndef OPENSSL_NO_POSIX_IO
     struct stat sb;
 #endif
@@ -160,9 +160,7 @@ int RAND_load_file(const char *file, long bytes)
          * because we will waste system entropy.
          */
         bytes = (bytes == -1) ? 2048 : bytes; /* ok, is 2048 enough? */
-# ifndef OPENSSL_NO_SETVBUF_IONBF
-        setvbuf(in, NULL, _IONBF, 0); /* don't do buffered reads */
-# endif                         /* ndef OPENSSL_NO_SETVBUF_IONBF */
+        setbuf(stdin, NULL); /* don't do buffered reads */
     }
 #endif
     for (;;) {