diff options
author | Tilghman Lesher <tilghman@meg.abyt.es> | 2008-01-28 18:27:29 +0000 |
---|---|---|
committer | Tilghman Lesher <tilghman@meg.abyt.es> | 2008-01-28 18:27:29 +0000 |
commit | 8fd1e10d3dca25d61a7367beca710e75d13e37cf (patch) | |
tree | 0377670ccd3c238e8bb54c763a689607fd0e3314 /main/logger.c | |
parent | e9de8df2fd1894cfc018abb5f053c7066263329a (diff) |
Normalize the detection for execinfo, so that Linux (glibc) and other platforms
with libexecinfo will generate inline stack backtraces correctly.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@100628 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/logger.c')
-rw-r--r-- | main/logger.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/main/logger.c b/main/logger.c index 252b620b6..31fd1a91b 100644 --- a/main/logger.c +++ b/main/logger.c @@ -41,7 +41,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$") #include <time.h> #include <sys/stat.h> #include <fcntl.h> -#if ((defined(AST_DEVMODE)) && (defined(linux))) +#ifdef HAVE_BKTR #include <execinfo.h> #define MAX_BACKTRACE_FRAMES 20 #endif @@ -1082,8 +1082,7 @@ void ast_log(int level, const char *file, int line, const char *function, const void ast_backtrace(void) { -#ifdef linux -#ifdef AST_DEVMODE +#ifdef HAVE_BKTR int count=0, i=0; void **addresses; char **strings; @@ -1106,10 +1105,7 @@ void ast_backtrace(void) ast_free(addresses); } #else - ast_log(LOG_WARNING, "Must run configure with '--enable-dev-mode' for stack backtraces.\n"); -#endif -#else /* ndef linux */ - ast_log(LOG_WARNING, "Inline stack backtraces are only available on the Linux platform.\n"); + ast_log(LOG_WARNING, "Must run configure with '--with-execinfo' for stack backtraces.\n"); #endif } |