diff options
| author | J08nY | 2019-08-02 18:06:26 +0200 |
|---|---|---|
| committer | J08nY | 2019-08-02 18:06:26 +0200 |
| commit | 01002c7677970b234518097f5441c27932b4a94c (patch) | |
| tree | bda16b8f3ba95ce5aa6131fed8062c22b80465bb /src/util/random.c | |
| parent | 9c26b5a5081913493cfa4b5d2010ad17be7f3c1a (diff) | |
| download | ecgen-01002c7677970b234518097f5441c27932b4a94c.tar.gz ecgen-01002c7677970b234518097f5441c27932b4a94c.tar.zst ecgen-01002c7677970b234518097f5441c27932b4a94c.zip | |
Diffstat (limited to 'src/util/random.c')
| -rw-r--r-- | src/util/random.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/util/random.c b/src/util/random.c index eaeceaf..b88bb50 100644 --- a/src/util/random.c +++ b/src/util/random.c @@ -6,6 +6,7 @@ #include "random.h" #include <time.h> +#include <stdint.h> void random_reseed(void) { pari_ulong seed = 0; @@ -14,7 +15,7 @@ void random_reseed(void) { if (rand) { size_t read = 0; while (read < sizeof(pari_ulong)) { - read += fread(&seed + read, 1, sizeof(pari_ulong) - read, rand); + read += fread(((uint8_t*) &seed) + read, 1, sizeof(pari_ulong) - read, rand); } fclose(rand); |
