diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-11-01 00:52:24 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-11-01 00:55:19 +0100 |
commit | c9416c7a31598ea77ad15d3b2f27a613ac95b436 (patch) | |
tree | 4010d6a15bf8495fd4cbab51d0efd62e930d9f0b | |
parent | 47b9e2396a11181ecd8bae10a4a7589efd1c80bf (diff) |
compat: unbreak unloading on kernels 4.6 through 4.9
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r-- | src/netlink.c | 5 |
1 files changed, 4 insertions, 1 deletions
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, |