From 7fef9f33a57ed1cf24ebb9c5f0646e95b89aa07b Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 10 Oct 2017 17:38:27 +0200 Subject: compat: move version logic to compat.h and out of main .c --- src/netlink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/netlink.c') 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), -- cgit v1.2.3-59-g8ed1b