aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/netlink.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-10-12 02:19:13 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2017-10-17 19:26:07 +0200
commitcff9537454ad09a2eca964902f80d53126a3d8be (patch)
tree088f2fc7912a3fc11702d127bcd9eb17fc3abd56 /src/netlink.c
parentnoise: handshake constants can be read-only after init (diff)
downloadwireguard-linux-compat-cff9537454ad09a2eca964902f80d53126a3d8be.tar.xz
wireguard-linux-compat-cff9537454ad09a2eca964902f80d53126a3d8be.zip
compat: just make ro_after_init read_mostly
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/netlink.c')
-rw-r--r--src/netlink.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/netlink.c b/src/netlink.c
index ff32fb6..71da081 100644
--- a/src/netlink.c
+++ b/src/netlink.c
@@ -471,12 +471,10 @@ static const struct genl_ops genl_ops[] = {
}
};
-#ifndef COMPAT_CANNOT_USE_GENL_NOPS
static struct genl_family genl_family __ro_after_init = {
+#ifndef COMPAT_CANNOT_USE_GENL_NOPS
.ops = genl_ops,
.n_ops = ARRAY_SIZE(genl_ops),
-#else
-static struct genl_family genl_family = {
#endif
.name = WG_GENL_NAME,
.version = WG_GENL_VERSION,