]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Fix an ABI compatibility issue with ast_log_safe for modules.
authorCorey Farrell <git@cfware.com>
Mon, 30 Mar 2015 11:40:33 +0000 (11:40 +0000)
committerCorey Farrell <git@cfware.com>
Mon, 30 Mar 2015 11:40:33 +0000 (11:40 +0000)
Binary modules are sometimes built against the latest release of
Asterisk in each branch, and need to be compatible with all
releases of that branch.  This change ensures that utils.h only
uses ast_log_safe from the core.  For modules and utilities ast_log
is used instead.

Review: https://reviewboard.asterisk.org/r/4548/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@433772 65c4cc65-6c06-0410-ace0-fbb531ad65f3

include/asterisk/utils.h
main/Makefile

index 93f9e7522314b51be5027e903966ba0ab3bdf505..ff59c85537239d1f2fd3347ab36374686e2a7164 100644 (file)
@@ -494,7 +494,7 @@ long int ast_random(void);
 #define ast_free free
 #define ast_free_ptr ast_free
 
-#if !defined(STANDALONE)
+#if defined(AST_IN_CORE)
 #define MALLOC_FAILURE_MSG \
        ast_log_safe(LOG_ERROR, "Memory Allocation Failure in function %s at line %d of %s\n", func, lineno, file)
 #else
index e061cf8e196e8243a7237a4ea3b7029cd204a932..69b420285cb99aab9e1ae2ae6b3c60914826bcfc 100644 (file)
@@ -186,7 +186,7 @@ ifneq ($(findstring ENABLE_UPLOADS,$(MENUSELECT_CFLAGS)),)
 GMIMELDFLAGS+=$(GMIME_LIB)
 endif
 
-$(OBJS): _ASTCFLAGS+=-DAST_MODULE=\"core\"
+$(OBJS): _ASTCFLAGS+=-DAST_MODULE=\"core\" -DAST_IN_CORE
 
 libasteriskssl.o: _ASTCFLAGS+=$(OPENSSL_INCLUDE)