aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-09-05 15:36:40 -0600
committerJason A. Donenfeld <Jason@zx2c4.com>2019-09-05 15:37:14 -0600
commit614e3adc489a55fe620a4a7b15a359a2401f6537 (patch)
tree89d19c01254e08a1e9ed170f5c71d13b063d8550
parenttools: windows: enforce named pipe ownership and use protected prefix (diff)
downloadWireGuard-614e3adc489a55fe620a4a7b15a359a2401f6537.tar.xz
WireGuard-614e3adc489a55fe620a4a7b15a359a2401f6537.zip
compat: work around ubuntu breakage
They forgot to backport hsiphash.
-rw-r--r--src/compat/compat.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/compat/compat.h b/src/compat/compat.h
index fb09037..a608fb3 100644
--- a/src/compat/compat.h
+++ b/src/compat/compat.h
@@ -21,6 +21,8 @@
#ifdef UTS_UBUNTU_RELEASE_ABI
#if LINUX_VERSION_CODE == KERNEL_VERSION(3, 13, 11)
#define ISUBUNTU1404
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0) && LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0)
+#define ISUBUNTU1604
#endif
#endif
#ifdef CONFIG_SUSE_KERNEL
@@ -840,6 +842,13 @@ static inline void skb_mark_not_on_list(struct sk_buff *skb)
#define cpu_have_named_feature(name) (elf_hwcap & (HWCAP_ ## name))
#endif
+#if defined(ISUBUNTU1604)
+#include <linux/siphash.h>
+#define hsiphash_2u32 siphash_2u32
+#define hsiphash_3u32 siphash_3u32
+#define hsiphash_key_t siphash_key_t
+#endif
+
#ifdef CONFIG_VE
#include <linux/netdev_features.h>
#ifdef NETIF_F_VIRTUAL