aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/netlink.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-10-10 17:38:27 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2017-10-11 15:50:21 +0200
commit7fef9f33a57ed1cf24ebb9c5f0646e95b89aa07b (patch)
treebc89e3c9363fd42ad7c6ceeb9fd8ff753fc083f2 /src/netlink.c
parenttools: store tail pointer to make coalescing peers fast (diff)
downloadwireguard-monolithic-historical-7fef9f33a57ed1cf24ebb9c5f0646e95b89aa07b.tar.xz
wireguard-monolithic-historical-7fef9f33a57ed1cf24ebb9c5f0646e95b89aa07b.zip
compat: move version logic to compat.h and out of main .c
Diffstat (limited to 'src/netlink.c')
-rw-r--r--src/netlink.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/netlink.c b/src/netlink.c
index e727669..ff32fb6 100644
--- a/src/netlink.c
+++ b/src/netlink.c
@@ -456,7 +456,7 @@ out_nodev:
static const struct genl_ops genl_ops[] = {
{
.cmd = WG_CMD_GET_DEVICE,
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)
+#ifndef COMPAT_CANNOT_USE_NETLINK_START
.start = get_device_start,
#endif
.dumpit = get_device_dump,
@@ -471,7 +471,7 @@ static const struct genl_ops genl_ops[] = {
}
};
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
+#ifndef COMPAT_CANNOT_USE_GENL_NOPS
static struct genl_family genl_family __ro_after_init = {
.ops = genl_ops,
.n_ops = ARRAY_SIZE(genl_ops),