diff options
author | Corey Farrell <git@cfware.com> | 2015-05-08 13:30:26 -0400 |
---|---|---|
committer | Corey Farrell <git@cfware.com> | 2015-05-08 15:38:03 -0400 |
commit | 2d4dc0c9639f52fb8db3dc9a8e5c59a4a0cac401 (patch) | |
tree | 344b25345f595319267e25d7d738c9f846b94817 /res/res_fax_spandsp.c | |
parent | f93b3a22d6217e28059a92f9d24fce055f8b3f3c (diff) |
Fix error's produced by astmm.h when standard allocators are used.
astmm.h includes defines that are meant to cause error's when standard
allocators (malloc, calloc, free, etc) are used. It actually only
causes a warning, which is not always caught on certain sources. In
modules this unknown symbol is not detected until runtime, where the
module fails to load. This modifies the define's so that using one
of the blocked functions will cause a compile error regardless of
CFLAGS.
Moved spandsp header includes to before asterisk.h so the static inline
functions can continue using malloc and free. Although these functions
are never called and optimized away, the updated replacement macro's
would still cause a failure.
Change-Id: I532640aca0913ba9da3b18c04a0f010ca1715af5
Diffstat (limited to 'res/res_fax_spandsp.c')
-rw-r--r-- | res/res_fax_spandsp.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/res/res_fax_spandsp.c b/res/res_fax_spandsp.c index 288f91dac..42492273d 100644 --- a/res/res_fax_spandsp.c +++ b/res/res_fax_spandsp.c @@ -48,14 +48,16 @@ <support_level>extended</support_level> ***/ -#include "asterisk.h" - -ASTERISK_REGISTER_FILE() - +/* Include spandsp headers before asterisk.h so the inline functions can continue using + * malloc and free, even with MALLOC_DEBUG enabled. */ #define SPANDSP_EXPOSE_INTERNAL_STRUCTURES #include <spandsp.h> #include <spandsp/version.h> +#include "asterisk.h" + +ASTERISK_REGISTER_FILE() + #include "asterisk/logger.h" #include "asterisk/module.h" #include "asterisk/strings.h" |