From: Simon Marchi Date: Thu, 2 Sep 2021 02:30:02 +0000 (-0400) Subject: Fix: add extern "C" to two header files X-Git-Tag: v2.12.3~9 X-Git-Url: http://git.lttng.org/?p=lttng-ust.git;a=commitdiff_plain;h=35a1054b28bbbcec639742c2891d157402c5c451 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 --- 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 */