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.13.1~18 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=e7eaa1d29df0017f5f809dd69b12930c454e7fdd;p=lttng-ust.git 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 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 */