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