libubus: replace __init with __constructor
__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>
This commit is contained in:
parent
e52db46c9c
commit
4d1cdc5527
3 changed files with 2 additions and 4 deletions
|
@ -21,6 +21,4 @@
|
|||
#define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0]))
|
||||
#endif
|
||||
|
||||
#define __init __attribute__((constructor))
|
||||
|
||||
#endif
|
||||
|
|
|
@ -219,7 +219,7 @@ void ubusd_free_object(struct ubus_object *obj)
|
|||
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);
|
||||
|
|
|
@ -506,7 +506,7 @@ void ubus_notify_unsubscribe(struct ubus_subscription *s)
|
|||
ubus_unsubscribe(s);
|
||||
}
|
||||
|
||||
static void __init ubusd_proto_init(void)
|
||||
static void __constructor ubusd_proto_init(void)
|
||||
{
|
||||
ubus_init_id_tree(&clients);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue