diff options
Diffstat (limited to 'src/compat/siphash/siphash.c')
-rw-r--r-- | src/compat/siphash/siphash.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/compat/siphash/siphash.c b/src/compat/siphash/siphash.c index 3ae58b4..1ebfd5e 100644 --- a/src/compat/siphash/siphash.c +++ b/src/compat/siphash/siphash.c @@ -13,6 +13,16 @@ #include <linux/siphash.h> #include <asm/unaligned.h> +#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 14, 0) +#ifdef __LITTLE_ENDIAN + #define HASH_LEN_DECLARE u32 hash; u32 len; + #define bytemask_from_count(cnt) (~(~0ul << (cnt)*8)) +#else + #define HASH_LEN_DECLARE u32 len; u32 hash; + #define bytemask_from_count(cnt) (~(~0ul >> (cnt)*8)) +#endif +#endif + #if defined(CONFIG_DCACHE_WORD_ACCESS) && BITS_PER_LONG == 64 #include <linux/dcache.h> #include <asm/word-at-a-time.h> |