aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/netlink.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-11-01 00:52:24 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2017-11-01 00:55:19 +0100
commit748ca6b3a58eaf3859081383c0e42284aed94364 (patch)
treeedd0bc083d317ce181bbff460ab6c2091dc805e3 /src/netlink.c
parenttimers: switch to kees' new timer_list functions (diff)
downloadwireguard-monolithic-historical-748ca6b3a58eaf3859081383c0e42284aed94364.tar.xz
wireguard-monolithic-historical-748ca6b3a58eaf3859081383c0e42284aed94364.zip
compat: unbreak unloading on kernels 4.6 through 4.9
Diffstat (limited to 'src/netlink.c')
-rw-r--r--src/netlink.c5
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,