From 4cc6a9deb8eb65c8771ed56ae9fc950f3efa99c6 Mon Sep 17 00:00:00 2001 From: Luka Perkov Date: Wed, 29 Jan 2014 11:21:59 +0000 Subject: fix segmentation fault when plugins are loaded Function rpc_plugin_register_library() is modifying the struct's contents in list_add() call. That said, the rpc_plugin struct should not be defined as const. This caused segmentation fault when built on up-to-date Arch Linux. Signed-off-by: Luka Perkov --- file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'file.c') diff --git a/file.c b/file.c index f9c65a2..e4c957e 100644 --- a/file.c +++ b/file.c @@ -612,6 +612,6 @@ rpc_file_api_init(const struct rpc_daemon_ops *o, struct ubus_context *ctx) return ubus_add_object(ctx, &obj); } -const struct rpc_plugin rpc_plugin = { +struct rpc_plugin rpc_plugin = { .init = rpc_file_api_init }; -- cgit v1.2.1