From: Jo-Philipp Wich Date: Sun, 25 Jan 2015 17:41:21 +0000 (+0100) Subject: luci2: don't mark rpc_plugin symbols constant X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=e463c1df065e8aee0428e7156fdcc91f4d06d6c1;p=project%2Fluci2%2Fui.git luci2: don't mark rpc_plugin symbols constant The rpcd daemon modifies the list_head member of the rpc_plugin struct, therfore we cannot mark it const, otherwise we're hitting an access violation if rpcd is built with relro support. Signed-off-by: Jo-Philipp Wich --- diff --git a/luci2/src/rpcd/bwmon.c b/luci2/src/rpcd/bwmon.c index 4650329..bb0cf35 100644 --- a/luci2/src/rpcd/bwmon.c +++ b/luci2/src/rpcd/bwmon.c @@ -278,6 +278,6 @@ rpc_bwmon_api_init(const struct rpc_daemon_ops *o, struct ubus_context *ctx) return ubus_add_object(ctx, &bwmon_obj); } -const struct rpc_plugin rpc_plugin = { +struct rpc_plugin rpc_plugin = { .init = rpc_bwmon_api_init }; diff --git a/luci2/src/rpcd/luci2.c b/luci2/src/rpcd/luci2.c index cc7423d..179a055 100644 --- a/luci2/src/rpcd/luci2.c +++ b/luci2/src/rpcd/luci2.c @@ -2888,6 +2888,6 @@ rpc_luci2_api_init(const struct rpc_daemon_ops *o, struct ubus_context *ctx) return rv; } -const struct rpc_plugin rpc_plugin = { +struct rpc_plugin rpc_plugin = { .init = rpc_luci2_api_init };