From: Guus Sliepen Date: Sun, 25 May 2014 14:38:05 +0000 (+0200) Subject: Automatically add extern "C" when including meshlink.h in a C++ project. X-Git-Url: http://git.meshlink.io/?p=meshlink;a=commitdiff_plain;h=f7966aeb18195987a244e37df49847af5766605d Automatically add extern "C" when including meshlink.h in a C++ project. --- 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