summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
e52db46)
__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 ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
#endif
-#define __init __attribute__((constructor))
-
-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_init_id_tree(&objects);
ubus_init_id_tree(&obj_types);
-static void __init ubusd_proto_init(void)
+static void __constructor ubusd_proto_init(void)
{
ubus_init_id_tree(&clients);
{
ubus_init_id_tree(&clients);