Index: include/asterisk/utils.h =================================================================== --- include/asterisk/utils.h (revision 432991) +++ include/asterisk/utils.h (working copy) @@ -25,7 +25,10 @@ #include "asterisk/network.h" +#if defined(HAVE_BKTR) #include +#endif + #include /* we want to override localtime_r */ #include #include @@ -500,6 +503,7 @@ #define ast_free free #define ast_free_ptr ast_free +#if defined(HAVE_BKTR) /* * This buffer is in static memory. We never intend to read it, * nor do we care about multiple threads writing to it at the @@ -520,6 +524,9 @@ ast_log(LOG_ERROR, "Memory Allocation Failure in function %s at line %d of %s\n", func, lineno, file); \ } \ } while (0) +#else +#define MALLOC_FAILURE_MSG do {} while (0) +#endif /*! * \brief A wrapper for malloc() Index: main/hashtab.c =================================================================== --- main/hashtab.c (revision 432991) +++ main/hashtab.c (working copy) @@ -43,7 +43,7 @@ #include "asterisk/hashtab.h" -#ifndef __AST_DEBUG_MALLOC +#if !defined(__AST_DEBUG_MALLOC) && defined(HAVE_BKTR) void *_ast_mem_backtrace_buffer[_AST_MEM_BACKTRACE_BUFLEN]; #endif