From: Tomas Mraz Date: Wed, 11 Oct 2023 09:20:02 +0000 (+0200) Subject: Windows: use srand() instead of srandom() X-Git-Tag: openssl-3.2.0-beta1~95 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b107b86ca7d1c6309bc7071ead59acb8c098f3b;p=thirdparty%2Fopenssl.git Windows: use srand() instead of srandom() This is used for memory allocation failure debugging only Reviewed-by: Tom Cosgrove Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/22347) --- diff --git a/crypto/mem.c b/crypto/mem.c index d7aa3ab85d8..eef1165708c 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.