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 | a849803dc9aa139ce209d7b8ccf0bd57b52929c8 (patch) | |
tree | c44054cc6450b0b02613de05175ab94b38b2b373 /src/compat/compat.h | |
parent | poly1305: better module description (diff) | |
download | wireguard-monolithic-historical-a849803dc9aa139ce209d7b8ccf0bd57b52929c8.tar.xz wireguard-monolithic-historical-a849803dc9aa139ce209d7b8ccf0bd57b52929c8.zip |
blake2s: simplify final function
Suggested-by: Eric Biggers <ebiggers@kernel.org>
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> |