From: Tobias Brunner Date: Fri, 8 Mar 2013 15:43:07 +0000 (+0100) Subject: esc() is only used if dladdr(3) is available X-Git-Tag: 5.0.3dr3^0 X-Git-Url: https://git.strongswan.org/?p=strongswan.git;a=commitdiff_plain;h=2b1e2434e422b1701184b594bc386b1532da75af esc() is only used if dladdr(3) is available --- diff --git a/src/libstrongswan/utils/backtrace.c b/src/libstrongswan/utils/backtrace.c index 4557198..77137f9 100644 --- a/src/libstrongswan/utils/backtrace.c +++ b/src/libstrongswan/utils/backtrace.c @@ -53,18 +53,6 @@ struct private_backtrace_t { }; /** - * Same as tty_escape_get(), but for a potentially NULL FILE* - */ -static char* esc(FILE *file, tty_escape_t escape) -{ - if (file) - { - return tty_escape_get(fileno(file), escape); - } - return ""; -} - -/** * Write a format string with arguments to a FILE line, if it is NULL to DBG */ static void println(FILE *file, char *format, ...) @@ -87,6 +75,19 @@ static void println(FILE *file, char *format, ...) } #ifdef HAVE_DLADDR + +/** + * Same as tty_escape_get(), but for a potentially NULL FILE* + */ +static char* esc(FILE *file, tty_escape_t escape) +{ + if (file) + { + return tty_escape_get(fileno(file), escape); + } + return ""; +} + #ifdef HAVE_BFD_H #include