__init has a naming collision with C++ and prevents ubus_common.h
from being included. Instead, use __constructor as defined from
libubox.
Signed-off-by: Zefir Kurtisi <zefir.kurtisi@neratec.com>
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
#endif
-#define __init __attribute__((constructor))
-
#endif
free(obj);
}
-static void __init ubusd_obj_init(void)
+static void __constructor ubusd_obj_init(void)
{
ubus_init_id_tree(&objects);
ubus_init_id_tree(&obj_types);
ubus_unsubscribe(s);
}
-static void __init ubusd_proto_init(void)
+static void __constructor ubusd_proto_init(void)
{
ubus_init_id_tree(&clients);