From 81b2d23800224648edd5850dd43b78d00b668a5e 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 d608a933..a5b7176d 100644 --- a/include/lttng/ust-clock.h +++ b/include/lttng/ust-clock.h @@ -10,6 +10,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 @@ -63,4 +67,8 @@ int lttng_ust_trace_clock_get_description_cb(lttng_ust_clock_description_functio */ 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 6e99bff5..360bb09a 100644 --- a/include/lttng/ust-ctl.h +++ b/include/lttng/ust-ctl.h @@ -18,6 +18,10 @@ #include #include +#ifdef __cplusplus +extern "C" { +#endif + #ifndef LTTNG_UST_UUID_LEN #define LTTNG_UST_UUID_LEN 16 #endif @@ -656,4 +660,8 @@ int lttng_ust_ctl_counter_clear(struct lttng_ust_ctl_daemon_counter *counter, void lttng_ust_ctl_sigbus_handle(void *addr); +#ifdef __cplusplus +} +#endif + #endif /* _LTTNG_UST_CTL_H */ -- 2.34.1