chiark / gitweb /
test: fix "make check"
[elogind.git] / src / test / test-prioq.c
index aeac73973b3eee699eb221cf4dddc633bae6fbf0..cdb1e4ad52df3768253b957373ff9954b5f7f3ba 100644 (file)
@@ -24,6 +24,7 @@
 #include "util.h"
 #include "set.h"
 #include "prioq.h"
+#include "siphash24.h"
 
 #define SET_SIZE 1024*4
 
@@ -88,10 +89,13 @@ static int test_compare(const void *a, const void *b) {
         return 0;
 }
 
-static unsigned test_hash(const void *a) {
+static unsigned long test_hash(const void *a, const uint8_t hash_key[HASH_KEY_SIZE]) {
         const struct test *x = a;
+        uint64_t u;
 
-        return x->value;
+        siphash24((uint8_t*) &u, &x->value, sizeof(x->value), hash_key);
+
+        return (unsigned long) u;
 }
 
 static void test_struct(void) {