summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorTomas Mraz <tomas@openssl.org>2023-10-11 11:20:02 +0200
committerTomas Mraz <tomas@openssl.org>2023-10-13 15:09:31 +0200
commit6509e65a04938d420a58036ec133b2948549c5c4 (patch)
tree533a966e65ce99440e2e39e15239b8c92d96dc69 /crypto
parente657444c6fd580dc955173dfde3b81982f5860c4 (diff)
Windows: use srand() instead of srandom()
This is used for memory allocation failure debugging only Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com> Reviewed-by: Paul Dale <pauli@openssl.org> (Merged from https://github.com/openssl/openssl/pull/22347) (cherry picked from commit 3b107b86ca7d1c6309bc7071ead59acb8c098f3b)
Diffstat (limited to 'crypto')
-rw-r--r--crypto/mem.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/mem.c b/crypto/mem.c
index ef0b744049..34128616e2 100644
--- a/crypto/mem.c
+++ b/crypto/mem.c
@@ -122,12 +122,13 @@ static void parseit(void)
}
/*
- * Windows doesn't have random(), but it has rand()
+ * Windows doesn't have random() and srandom(), but it has rand() and srand().
* Some rand() implementations aren't good, but we're not
* dealing with secure randomness here.
*/
# ifdef _WIN32
# define random() rand()
+# define srandom(seed) srand(seed)
# endif
/*
* See if the current malloc should fail.