aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/compat/compat.h
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-09-27 05:07:28 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-10-02 03:41:49 +0200
commit2f6995456ea8019ed7124578feeb1b5738978d5a (patch)
treeb68ba40a00dfa3827ab14d87095a26c62a6a9f71 /src/compat/compat.h
parentblake2s: feed fpu functions PAGE_SIZE at a time (diff)
downloadwireguard-monolithic-historical-2f6995456ea8019ed7124578feeb1b5738978d5a.tar.xz
wireguard-monolithic-historical-2f6995456ea8019ed7124578feeb1b5738978d5a.zip
blake2s: rename arch function and use slicker le32 helper
Diffstat (limited to '')
-rw-r--r--src/compat/compat.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/compat/compat.h b/src/compat/compat.h
index 17606f5..2e67edb 100644
--- a/src/compat/compat.h
+++ b/src/compat/compat.h
@@ -689,6 +689,13 @@ static inline void *skb_put_data(struct sk_buff *skb, const void *data, unsigned
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 17, 0)
+static inline void le32_to_cpu_array(u32 *buf, unsigned int words)
+{
+ while (words--) {
+ __le32_to_cpus(buf);
+ buf++;
+ }
+}
static inline void cpu_to_le32_array(u32 *buf, unsigned int words)
{
while (words--) {