diff --git a/include/haproxy/tools.h b/include/haproxy/tools.h index 3377ed03f..c3549918c 100644 --- a/include/haproxy/tools.h +++ b/include/haproxy/tools.h @@ -45,8 +45,6 @@ #include #include #include -#include -#include /****** string-specific macros and functions ******/ /* if a > max, then bound to . The macro returns the new */ @@ -57,9 +55,6 @@ #define SWAP(a, b) do { typeof(a) t; t = a; a = b; b = t; } while(0) -/* return the hash of a string and length for a given key. All keys are valid. */ -#define HA_ANON(key, str, len) (XXH32(str, len, key) & 0xFFFFFF) - /* use if you want to return a simple hash. Key 0 doesn't hash. */ #define HA_ANON_STR(key, str) hash_anon(key, str, "", "") diff --git a/src/tools.c b/src/tools.c index cfa1cc6aa..a392fe573 100644 --- a/src/tools.c +++ b/src/tools.c @@ -69,6 +69,7 @@ extern void *__elf_aux_vector; #include #include #include +#include /* This macro returns false if the test __x is false. Many * of the following parsing function must be abort the processing @@ -79,6 +80,9 @@ extern void *__elf_aux_vector; /* Define the number of line of hash_word */ #define NB_L_HASH_WORD 15 +/* return the hash of a string and length for a given key. All keys are valid. */ +#define HA_ANON(key, str, len) (XXH32(str, len, key) & 0xFFFFFF) + /* enough to store NB_ITOA_STR integers of : * 2^64-1 = 18446744073709551615 or * -2^63 = -9223372036854775808