Add an extern "C" wrapper so that tracef.h can be included (and the tracef() function can be used) from C++ files, too.
Signed-off-by: Gerlando Falauto <[email protected]> --- include/lttng/tracef.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/lttng/tracef.h b/include/lttng/tracef.h index 16a984b..45d0587 100644 --- a/include/lttng/tracef.h +++ b/include/lttng/tracef.h @@ -25,9 +25,17 @@ #include <lttng/lttng-ust-tracef.h> +#ifdef __cplusplus +extern "C" { +#endif + extern void _lttng_ust_tracef(const char *fmt, ...); +#ifdef __cplusplus +} +#endif + #define tracef(fmt, ...) \ do { \ STAP_PROBEV(tracepoint_lttng_ust_tracef, event, ## __VA_ARGS__); \ -- 1.8.0.1 _______________________________________________ lttng-dev mailing list [email protected] http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev
