From f7966aeb18195987a244e37df49847af5766605d Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Sun, 25 May 2014 16:38:05 +0200 Subject: [PATCH] Automatically add extern "C" when including meshlink.h in a C++ project. --- src/meshlink.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/meshlink.h b/src/meshlink.h index 86d2587c..fdf0896e 100644 --- a/src/meshlink.h +++ b/src/meshlink.h @@ -23,6 +23,10 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif + /// A handle for an instance of MeshLink. typedef struct meshlink_handle meshlink_handle_t; @@ -294,4 +298,8 @@ extern bool meshlink_import(meshlink_handle_t *mesh, const char *data); */ extern void meshlink_blacklist(meshlink_handle_t *mesh, meshlink_node_t *node); +#ifdef __cplusplus +} +#endif + #endif // MESHLINK_H -- 2.39.5