From 35a1054b28bbbcec639742c2891d157402c5c451 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Wed, 1 Sep 2021 22:30:02 -0400 Subject: [PATCH] Fix: add extern "C" to two header files These are needed to build some lttng-tools binary as C++ programs. Signed-off-by: Simon Marchi Signed-off-by: Mathieu Desnoyers Change-Id: Iba97d9cc52f86fd01cc24111c53a85340595e4c4 --- include/lttng/ust-clock.h | 8 ++++++++ include/lttng/ust-ctl.h | 8 ++++++++ 2 files changed, 16 insertions(+) diff --git a/include/lttng/ust-clock.h b/include/lttng/ust-clock.h index 52455a61..06454e47 100644 --- a/include/lttng/ust-clock.h +++ b/include/lttng/ust-clock.h @@ -22,6 +22,10 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif + /* * Set each callback for the trace clock override, and then enable the * override. Those functions return negative error values on error, 0 on @@ -64,4 +68,8 @@ int lttng_ust_trace_clock_set_description_cb(const char *(*description)(void)); */ int lttng_ust_enable_trace_clock_override(void); +#ifdef __cplusplus +} +#endif + #endif /* LTTNG_UST_CLOCK_H */ diff --git a/include/lttng/ust-ctl.h b/include/lttng/ust-ctl.h index 932940ba..d9eba3ef 100644 --- a/include/lttng/ust-ctl.h +++ b/include/lttng/ust-ctl.h @@ -27,6 +27,10 @@ #error "LTTNG_PACKED should be defined" #endif +#ifdef __cplusplus +extern "C" { +#endif + #ifndef LTTNG_UST_UUID_LEN #define LTTNG_UST_UUID_LEN 16 #endif @@ -518,4 +522,8 @@ int ustctl_reply_register_channel(int sock, enum ustctl_channel_header header_type, int ret_code); /* return code. 0 ok, negative error */ +#ifdef __cplusplus +} +#endif + #endif /* _LTTNG_UST_CTL_H */ -- 2.34.1