]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
esc() is only used if dladdr(3) is available 5.0.3dr3
authorTobias Brunner <tobias@strongswan.org>
Fri, 8 Mar 2013 15:43:07 +0000 (16:43 +0100)
committerTobias Brunner <tobias@strongswan.org>
Fri, 8 Mar 2013 15:45:09 +0000 (16:45 +0100)
src/libstrongswan/utils/backtrace.c

index 45571981eff5997723482970c8003acbf8f5a61d..77137f9f1a3843ef9427a64e8b51593242ae6d49 100644 (file)
@@ -52,18 +52,6 @@ struct private_backtrace_t {
        void *frames[];
 };
 
-/**
- * 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
  */
@@ -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 <bfd.h>