aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/compat/compat.h
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-07-03 03:46:00 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2017-07-03 04:12:46 +0200
commitb22a2685127d28a66e29430e0644ebfb5552f50e (patch)
tree4ea0850be0e4ece62e3b0639413cc18634ec9ace /src/compat/compat.h
parentreceive: cleanup error handlers (diff)
downloadwireguard-linux-compat-b22a2685127d28a66e29430e0644ebfb5552f50e.tar.xz
wireguard-linux-compat-b22a2685127d28a66e29430e0644ebfb5552f50e.zip
compat: support OpenSUSE's backports
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/compat/compat.h')
-rw-r--r--src/compat/compat.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/compat/compat.h b/src/compat/compat.h
index 562c050..539b4bf 100644
--- a/src/compat/compat.h
+++ b/src/compat/compat.h
@@ -18,6 +18,11 @@
#define ISUBUNTU1404
#endif
#endif
+#ifdef CONFIG_SUSE_KERNEL
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 5, 0) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 4, 0)
+#define ISOPENSUSE42
+#endif
+#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 10, 0)
#error "WireGuard requires Linux >= 3.10"
@@ -88,7 +93,7 @@ static const struct ipv6_stub_type *ipv6_stub = &ipv6_stub_impl;
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 8, 0) && IS_ENABLED(CONFIG_IPV6)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 8, 0) && IS_ENABLED(CONFIG_IPV6) && !defined(ISOPENSUSE42)
#include <net/addrconf.h>
static inline bool ipv6_mod_enabled(void)
{