From: Eric Bollengier Date: Thu, 8 Sep 2016 13:13:18 +0000 (+0200) Subject: Fix compilation without SMARTALLOC X-Git-Tag: Release-7.4.4~18 X-Git-Url: https://git.sur5r.net/?p=bacula%2Fbacula;a=commitdiff_plain;h=f4be2a661836ac97a7aab8af0bb6e5b1fb49b746 Fix compilation without SMARTALLOC --- diff --git a/bacula/src/lib/bsys.c b/bacula/src/lib/bsys.c index 9235ab25c5..54add7bb3f 100644 --- a/bacula/src/lib/bsys.c +++ b/bacula/src/lib/bsys.c @@ -327,7 +327,14 @@ int cstrlen(const char *str) return len; } - +/* We need to disable the malloc() macro if SMARTALLOC is not used, + * else, it points to b_malloc() and causes problems. + */ +#ifndef SMARTALLOC + #ifdef malloc + #undef malloc + #endif +#endif #ifndef bmalloc void *bmalloc(size_t size)