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.7.5~16 X-Git-Url: http://git.liburcu.org/?a=commitdiff_plain;h=f8dc4e455a3aa1745a5b789fc707182b7b5439e0;hp=35763354e732e0cc81e6e282382868c235c5ae0f;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 c80da921..3879920e 100644 --- a/include/lttng/tracepoint.h +++ b/include/lttng/tracepoint.h @@ -226,8 +226,6 @@ struct lttng_ust_tracepoint_dlopen { extern struct lttng_ust_tracepoint_dlopen tracepoint_dlopen; extern struct lttng_ust_tracepoint_dlopen *tracepoint_dlopen_ptr; -#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 @@ -332,8 +330,6 @@ __tracepoints__destroy(void) } } -#endif - #ifdef TRACEPOINT_DEFINE /*