From: Peter Stadler Date: Sat, 7 Dec 2019 11:45:47 +0000 (+0100) Subject: ubus: make libubus ready for linking into C++ X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=d35df8adda873dc75d876f72b78e84db8cfa72ee;p=oweals%2Fubus.git ubus: make libubus ready for linking into C++ Use extern "C" { ... } if using libubus.h in a C++ project. Signed-off-by: Peter Stadler --- diff --git a/libubus.h b/libubus.h index dc42ea7..6925514 100644 --- a/libubus.h +++ b/libubus.h @@ -14,6 +14,10 @@ #ifndef __LIBUBUS_H #define __LIBUBUS_H +#ifdef __cplusplus +extern "C" { +#endif + #include #include #include @@ -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