X-Git-Url: https://git.lttng.org/?p=lttng-tools.git;a=blobdiff_plain;f=src%2Fcommon%2Fmacros.h;fp=src%2Fcommon%2Fmacros.h;h=6ac24fa01157b79cbf1debc58fbcb49438288af2;hp=af9cb7e19bca6ac8eb632e2a5b6941d04aff285c;hb=d50d200af8d01f4b58a14e384cabd46b1afb4817;hpb=411b31544f22b773b4aad6cdb81faa81dc05e641 diff --git a/src/common/macros.h b/src/common/macros.h index af9cb7e19..6ac24fa01 100644 --- a/src/common/macros.h +++ b/src/common/macros.h @@ -101,6 +101,13 @@ void *zmalloc(size_t len) _Pragma("GCC diagnostic ignored \"-Wformat-nonliteral\"") #endif +/* Used to make specific C++ functions to C code. */ +#ifdef __cplusplus +#define C_LINKAGE extern "C" +#else +#define C_LINKAGE +#endif + /* * lttng_strncpy returns 0 on success, or nonzero on failure. * It checks that the @src string fits into @dst_len before performing