diff options
-rw-r--r-- | src/shared/hashmap.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/shared/hashmap.c b/src/shared/hashmap.c index 8f5957b4ac..3762e3ab0d 100644 --- a/src/shared/hashmap.c +++ b/src/shared/hashmap.c @@ -185,7 +185,6 @@ Hashmap *hashmap_new(hash_func_t hash_func, compare_func_t compare_func) { bool b; Hashmap *h; size_t size; - void *auxv; b = is_main_thread(); @@ -222,8 +221,11 @@ Hashmap *hashmap_new(hash_func_t hash_func, compare_func_t compare_func) { * rehash everything using a new random XOR mask from * /dev/random. */ #ifdef HAVE_SYS_AUXV_H - auxv = (void*) getauxval(AT_RANDOM); - h->random_xor = auxv ? *(unsigned*) auxv : random_u(); + { + void *auxv; + auxv = (void*) getauxval(AT_RANDOM); + h->random_xor = auxv ? *(unsigned*) auxv : random_u(); + } #else h->random_xor = random_u(); #endif |