diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-11-03 16:21:40 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-11-03 16:21:40 -0500 |
| commit | 7ddb2ffb02f9fff5d78c990165d1008248628c66 (patch) | |
| tree | ed1df19b9a4f05cc44bdcb037cf394ecbaf4b78e /stdlib/stdlib.c | |
| parent | 5e767e1c387acc0269f449899d8149cdb585495e (diff) | |
Fix per-thread RNG
Diffstat (limited to 'stdlib/stdlib.c')
| -rw-r--r-- | stdlib/stdlib.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/stdlib/stdlib.c b/stdlib/stdlib.c index 8d937384..fb37fcfe 100644 --- a/stdlib/stdlib.c +++ b/stdlib/stdlib.c @@ -34,7 +34,10 @@ public void tomo_init(void) getrandom(&seed, sizeof(seed), 0); srand(seed); srand48(seed); - Int$init_random(seed); + + long long_seed; + getrandom(&long_seed, sizeof(long_seed), 0); + Int$init_random(long_seed); if (register_printf_specifier('k', printf_text, printf_text_size)) errx(1, "Couldn't set printf specifier"); |
