From: Mathieu Desnoyers Date: Mon, 18 Feb 2013 20:12:51 +0000 (-0500) Subject: Fix static build X-Git-Tag: v2.2.0-rc1~81 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=828c801ed0e0b82bb06421f561fc2d31184730e8;p=lttng-ust.git Fix static build Move init_usterr() to snprintf, along with its ust_loglevel state. Signed-off-by: Mathieu Desnoyers --- diff --git a/liblttng-ust/ust-core.c b/liblttng-ust/ust-core.c index f9c00ff0..60cdbfa9 100644 --- a/liblttng-ust/ust-core.c +++ b/liblttng-ust/ust-core.c @@ -24,19 +24,6 @@ static CDS_LIST_HEAD(lttng_transport_list); -void init_usterr(void) -{ - char *ust_debug; - - if (ust_loglevel == UST_LOGLEVEL_UNKNOWN) { - ust_debug = getenv("LTTNG_UST_DEBUG"); - if (ust_debug) - ust_loglevel = UST_LOGLEVEL_DEBUG; - else - ust_loglevel = UST_LOGLEVEL_NORMAL; - } -} - struct lttng_transport *lttng_transport_find(const char *name) { struct lttng_transport *transport; diff --git a/snprintf/core.c b/snprintf/core.c index 2fa9839c..966b5887 100644 --- a/snprintf/core.c +++ b/snprintf/core.c @@ -21,3 +21,16 @@ #include volatile enum ust_loglevel ust_loglevel; + +void init_usterr(void) +{ + char *ust_debug; + + if (ust_loglevel == UST_LOGLEVEL_UNKNOWN) { + ust_debug = getenv("LTTNG_UST_DEBUG"); + if (ust_debug) + ust_loglevel = UST_LOGLEVEL_DEBUG; + else + ust_loglevel = UST_LOGLEVEL_NORMAL; + } +}