[lttng-dev] [PATCH] tracef: add extern "C" wrapper
Gerlando Falauto
gerlando.falauto at keymile.com
Tue May 13 05:33:46 EDT 2014
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 <gerlando.falauto at keymile.com>
---
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
More information about the lttng-dev
mailing list