Skip to content
Snippets Groups Projects
Commit 01d245ef authored by Michael Niedermayer's avatar Michael Niedermayer Committed by Martin Storsjö
Browse files

random_seed: Rewrite the generic clock() based seed code


The new code is faster and reuses the previous state in case of
multiple calls.

The previous code could easily end up in near-infinite loops,
if the difference between two clock() calls never was larger than
1.

This makes fate-parseutils finish in finite time when run in wine,
if CryptGenRandom isn't available (which e.g. isn't available if
targeting Windows RT/metro).

Patch originally by Michael Niedermayer but with some modifications
by Martin Storsjö.

Signed-off-by: default avatarMartin Storsjö <martin@martin.st>
parent e61b8fa5
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment