From 828c801ed0e0b82bb06421f561fc2d31184730e8 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Mon, 18 Feb 2013 15:12:51 -0500 Subject: [PATCH] Fix static build Move init_usterr() to snprintf, along with its ust_loglevel state. Signed-off-by: Mathieu Desnoyers --- liblttng-ust/ust-core.c | 13 ------------- snprintf/core.c | 13 +++++++++++++ 2 files changed, 13 insertions(+), 13 deletions(-) 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; + } +} -- 2.34.1