diff options
author | Peter Stadler <peter.stadler@student.uibk.ac.at> | 2019-12-07 12:45:47 +0100 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2020-01-05 17:34:03 +0100 |
commit | d35df8adda873dc75d876f72b78e84db8cfa72ee (patch) | |
tree | 9e9698df46fe989924d83f9f61a16434aa045a17 /libubus.h | |
parent | 041c9d1c052bb4936fd03240f7d0dd64aedda972 (diff) | |
download | ubus-d35df8adda873dc75d876f72b78e84db8cfa72ee.tar.gz |
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>
Diffstat (limited to 'libubus.h')
-rw-r--r-- | libubus.h | 8 |
1 files changed, 8 insertions, 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 |