Browse Source

compile fix (#833)

pull/835/head
Logan oos Even 3 years ago
committed by GitHub
parent
commit
560b16f28f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/random_numbers.c

2
src/random_numbers.c

@ -98,9 +98,9 @@ uint64_t n2n_seed (void) {
uint64_t seed = 0; /* this could even go uninitialized */ uint64_t seed = 0; /* this could even go uninitialized */
uint64_t ret = 0; /* this could even go uninitialized */ uint64_t ret = 0; /* this could even go uninitialized */
size_t i = 0;
#ifdef SYS_getrandom #ifdef SYS_getrandom
size_t i;
int rc = -1; int rc = -1;
for(i = 0; (i < RND_RETRIES) && (rc != sizeof(seed)); i++) { for(i = 0; (i < RND_RETRIES) && (rc != sizeof(seed)); i++) {
rc = syscall (SYS_getrandom, &seed, sizeof(seed), GRND_NONBLOCK); rc = syscall (SYS_getrandom, &seed, sizeof(seed), GRND_NONBLOCK);

Loading…
Cancel
Save