From 748ca6b3a58eaf3859081383c0e42284aed94364 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Wed, 1 Nov 2017 00:52:24 +0100 Subject: compat: unbreak unloading on kernels 4.6 through 4.9 --- src/netlink.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/netlink.c') diff --git a/src/netlink.c b/src/netlink.c index fa8a766..064fad9 100644 --- a/src/netlink.c +++ b/src/netlink.c @@ -481,10 +481,13 @@ static const struct genl_ops genl_ops[] = { } }; -static struct genl_family genl_family __ro_after_init = { +static struct genl_family genl_family #ifndef COMPAT_CANNOT_USE_GENL_NOPS +__ro_after_init = { .ops = genl_ops, .n_ops = ARRAY_SIZE(genl_ops), +#else += { #endif .name = WG_GENL_NAME, .version = WG_GENL_VERSION, -- cgit v1.2.3-59-g8ed1b