From a849803dc9aa139ce209d7b8ccf0bd57b52929c8 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Wed, 19 Sep 2018 02:56:34 +0200 Subject: blake2s: simplify final function Suggested-by: Eric Biggers --- src/compat/compat.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/compat') 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 -- cgit v1.2.3-59-g8ed1b