luci2: don't mark rpc_plugin symbols constant
authorJo-Philipp Wich <jow@openwrt.org>
Sun, 25 Jan 2015 17:41:21 +0000 (18:41 +0100)
committerJo-Philipp Wich <jow@openwrt.org>
Sun, 25 Jan 2015 17:41:21 +0000 (18:41 +0100)
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 <jow@openwrt.org>
luci2/src/rpcd/bwmon.c
luci2/src/rpcd/luci2.c

index 4650329..bb0cf35 100644 (file)
@@ -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);
 }
 
        return ubus_add_object(ctx, &bwmon_obj);
 }
 
-const struct rpc_plugin rpc_plugin = {
+struct rpc_plugin rpc_plugin = {
        .init = rpc_bwmon_api_init
 };
        .init = rpc_bwmon_api_init
 };
index cc7423d..179a055 100644 (file)
@@ -2888,6 +2888,6 @@ rpc_luci2_api_init(const struct rpc_daemon_ops *o, struct ubus_context *ctx)
        return rv;
 }
 
        return rv;
 }
 
-const struct rpc_plugin rpc_plugin = {
+struct rpc_plugin rpc_plugin = {
        .init = rpc_luci2_api_init
 };
        .init = rpc_luci2_api_init
 };