mirror of
https://github.com/wolfcw/libfaketime.git
synced 2026-05-17 00:26:16 +03:00
Merge pull request #299 from dkg/fix-getrandom
Ensure that real_getrandom is initialized properly
This commit is contained in:
@@ -3684,6 +3684,10 @@ ssize_t getrandom(void *buf, size_t buflen, unsigned int flags) {
|
||||
return buflen;
|
||||
}
|
||||
else { /* if no FAKERANDOM_SEED was given, use the original function */
|
||||
if (!initialized)
|
||||
{
|
||||
ftpl_init();
|
||||
}
|
||||
return real_getrandom(buf, buflen, flags);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user