diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-09-19 02:56:34 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-09-19 23:29:45 +0200 |
commit | cb8af686daad9b45451a91906441f9749ea3ed71 (patch) | |
tree | 2ab5c6d14458cee94cba94b87f07103b418bb480 /src/compat/compat.h | |
parent | 57fd00dbd4da0c9ba6da84aefb80f4f4920a051c (diff) |
blake2s: simplify final function
Suggested-by: Eric Biggers <ebiggers@kernel.org>
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/compat/compat.h')
-rw-r--r-- | src/compat/compat.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/compat/compat.h b/src/compat/compat.h index 9e92236..c182234 100644 --- a/src/compat/compat.h +++ b/src/compat/compat.h @@ -688,6 +688,16 @@ static inline void *skb_put_data(struct sk_buff *skb, const void *data, unsigned #endif #endif +#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0) +static inline void cpu_to_le32_array(u32 *buf, unsigned int words) +{ + while (words--) { + __cpu_to_le32s(buf); + buf++; + } +} +#endif + /* https://lkml.kernel.org/r/20170624021727.17835-1-Jason@zx2c4.com */ #if IS_ENABLED(CONFIG_NF_CONNTRACK) #include <linux/ip.h> |