crypto/mem.c: on Windows, use rand() instead of random()
[openssl.git] / crypto / mem.c
index 0584814f73286f1bd1c06d9f9adc3c5b49aadc8f..aa5ac56b472791ad512b1dd174e0be8ea3bdbd3a 100644 (file)
@@ -111,6 +111,14 @@ static void parseit(void)
         md_failstring = semi;
 }
 
+/*
+ * Windows doesn't have random(), but it has rand()
+ * Some rand() implementations aren't good, but we're not
+ * dealing with secure randomness here.
+ */
+#ifdef _WIN32
+# define random() rand()
+#endif
 /*
  * See if the current malloc should fail.
  */