projects
/
project
/
ubus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
041c9d1
)
ubus: make libubus ready for linking into C++
author
Peter Stadler
<peter.stadler@student.uibk.ac.at>
Sat, 7 Dec 2019 11:45:47 +0000
(12:45 +0100)
committer
Hauke Mehrtens
<hauke@hauke-m.de>
Sun, 5 Jan 2020 16:34:03 +0000
(17:34 +0100)
Use extern "C" { ... } if using libubus.h in a C++ project.
Signed-off-by: Peter Stadler <peter.stadler@student.uibk.ac.at>
libubus.h
patch
|
blob
|
history
diff --git
a/libubus.h
b/libubus.h
index dc42ea78171a14608716911390676025ef9f80fd..6925514adb0fcea7929e52f67adabc04cbeacfaa 100644
(file)
--- a/
libubus.h
+++ b/
libubus.h
@@
-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