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
commitd9041e88616b73872087859072aa59ab672752a7 (patch)
treeab901de2522e6e4f5a2da9a5ec060c6aafd355e4 /src/netlink.c
parentnoise: handshake constants can be read-only after init (diff)
downloadwireguard-monolithic-historical-d9041e88616b73872087859072aa59ab672752a7.tar.xz
wireguard-monolithic-historical-d9041e88616b73872087859072aa59ab672752a7.zip
compat: just make ro_after_init read_mostly
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,