mirror of
https://github.com/openssl/openssl.git
synced 2025-01-18 13:44:20 +08:00
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)
This commit is contained in:
parent
10767fd9db
commit
3b107b86ca
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user