aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/compat/compat.h
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-11-26 13:44:36 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2017-11-26 13:44:36 +0100
commit26e3639dba77a2f78f6ca093c8a4ffa782a0883d (patch)
treebdc70bf795bc9ab705b8583841bb64ff54f21a7a /src/compat/compat.h
parentallowedips: simplify (diff)
downloadwireguard-monolithic-historical-26e3639dba77a2f78f6ca093c8a4ffa782a0883d.tar.xz
wireguard-monolithic-historical-26e3639dba77a2f78f6ca093c8a4ffa782a0883d.zip
compat: support 4.15's netlink and barrier changes
Diffstat (limited to 'src/compat/compat.h')
-rw-r--r--src/compat/compat.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/compat/compat.h b/src/compat/compat.h
index fa155d5..16e7923 100644
--- a/src/compat/compat.h
+++ b/src/compat/compat.h
@@ -38,6 +38,7 @@
#define __ro_after_init __read_mostly
#endif
+#include <linux/compiler.h>
#ifndef READ_ONCE
#define READ_ONCE ACCESS_ONCE
#endif
@@ -541,6 +542,11 @@ struct _____dummy_container { char dev; };
#define getnstimeofday64 getnstimeofday
#endif
+#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 15, 0)
+#include <net/genetlink.h>
+#define genl_dump_check_consistent(a, b) genl_dump_check_consistent(a, b, &genl_family)
+#endif
+
/* https://lkml.org/lkml/2017/6/23/790 */
#if IS_ENABLED(CONFIG_NF_CONNTRACK)
#include <linux/ip.h>