diff --git a/Makefile b/Makefile index fe6211d260..697c18a259 100644 --- a/Makefile +++ b/Makefile @@ -193,7 +193,7 @@ ASTCFLAGS+=-pipe -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declar ASTCFLAGS+=-include $(ASTTOPDIR)/include/asterisk/autoconfig.h ifeq ($(AST_DEVMODE),yes) - ASTCFLAGS+=-Werror -Wunused -Wundef $(AST_DECLARATION_AFTER_STATEMENT) + ASTCFLAGS+=-Werror -Wunused -Wundef $(AST_DECLARATION_AFTER_STATEMENT) -DAST_DEVMODE endif ifneq ($(findstring BSD,$(OSARCH)),) diff --git a/main/logger.c b/main/logger.c index 9adb191abe..209da2167f 100644 --- a/main/logger.c +++ b/main/logger.c @@ -964,7 +964,11 @@ void ast_backtrace(void) if ((strings = backtrace_symbols(addresses, count))) { ast_debug(1, "Got %d backtrace record%c\n", count, count != 1 ? 's' : ' '); for (i=0; i < count ; i++) { - ast_debug(1, "#%d: [%08X] %s\n", i, (unsigned int)addresses[i], strings[i]); +#if __WORDSIZE == 32 + ast_log(LOG_DEBUG, "#%d: [%08X] %s\n", i, (unsigned int)addresses[i], strings[i]); +#elif __WORDSIZE == 64 + ast_log(LOG_DEBUG, "#%d: [%016lX] %s\n", i, (unsigned long)addresses[i], strings[i]); +#endif } free(strings); } else {