summaryrefslogtreecommitdiff
path: root/src/shared/hashmap.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-12-10 19:52:16 +0000
committerLennart Poettering <lennart@poettering.net>2013-12-10 19:52:16 +0000
commit65a6df56f136ed3977f7fcd688f62a25371506fa (patch)
treedebd0eadb42f073d8f4b678f125b40da148f14c2 /src/shared/hashmap.c
parent14c1025934e709d07948c13ca62b40c35c91d111 (diff)
hashmap: make gcc shut up on old glibcs that lack getauxval()
Diffstat (limited to 'src/shared/hashmap.c')
-rw-r--r--src/shared/hashmap.c8
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