summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crypto/mem.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/crypto/mem.c b/crypto/mem.c
index 0584814f73..aa5ac56b47 100644
--- a/crypto/mem.c
+++ b/crypto/mem.c
@@ -112,6 +112,14 @@ static void parseit(void)
}
/*
+ * 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.
*/
static int shouldfail(void)