summaryrefslogtreecommitdiffhomepage
path: root/src/compat/compat.h
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-09-19 02:56:34 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2018-09-19 23:29:45 +0200
commitcb8af686daad9b45451a91906441f9749ea3ed71 (patch)
tree2ab5c6d14458cee94cba94b87f07103b418bb480 /src/compat/compat.h
parent57fd00dbd4da0c9ba6da84aefb80f4f4920a051c (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.h10
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>