From: Mathieu Desnoyers Date: Wed, 15 Jun 2016 20:34:09 +0000 (-0400) Subject: Fix: allow non-LGPL modules to use tracepoints X-Git-Tag: v2.9.0-rc1~64 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=7e954a78c04ed43bedab36359f5d5771c863838f;p=lttng-ust.git Fix: allow non-LGPL modules to use tracepoints Non-LGPL modules that use tracepoint instrumentation, but have no compile unit defining either TRACEPOINT_DEFINE or TRACEPOINT_CREATE_PROBES fail to build due to undefined reference to `tracepoint_dlopen_ptr'. Signed-off-by: Mathieu Desnoyers --- diff --git a/include/lttng/tracepoint.h b/include/lttng/tracepoint.h index 03bc913f..39f2c4db 100644 --- a/include/lttng/tracepoint.h +++ b/include/lttng/tracepoint.h @@ -241,8 +241,6 @@ static inline void tracepoint_disable_destructors(void) __tracepoints__disable_destructors = 1; } -#if defined(TRACEPOINT_DEFINE) || defined(TRACEPOINT_CREATE_PROBES) - /* * These weak symbols, the constructor, and destructor take care of * registering only _one_ instance of the tracepoints per shared-ojbect @@ -349,8 +347,6 @@ __tracepoints__destroy(void) } } -#endif - #ifdef TRACEPOINT_DEFINE /*