From 4e478eac82c3c8516e1d5766a66f16af38cfd1a6 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sun, 9 Apr 2017 06:25:04 +0200 Subject: compat: support 3.12 --- src/compat/siphash/siphash.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/compat/siphash') 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 #include +#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 #include -- cgit v1.2.3-59-g8ed1b