ubus: make libubus ready for linking into C++
Use extern "C" { ... } if using libubus.h in a C++ project. Signed-off-by: Peter Stadler <peter.stadler@student.uibk.ac.at>
This commit is contained in:
parent
041c9d1c05
commit
d35df8adda
1 changed files with 8 additions and 0 deletions
|
@ -14,6 +14,10 @@
|
|||
#ifndef __LIBUBUS_H
|
||||
#define __LIBUBUS_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <libubox/avl.h>
|
||||
#include <libubox/list.h>
|
||||
#include <libubox/blobmsg.h>
|
||||
|
@ -414,4 +418,8 @@ static inline int ubus_unregister_event_handler(struct ubus_context *ctx,
|
|||
return ubus_remove_object(ctx, &ev->obj);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue