From f4be2a661836ac97a7aab8af0bb6e5b1fb49b746 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Thu, 8 Sep 2016 15:13:18 +0200 Subject: [PATCH] Fix compilation without SMARTALLOC --- bacula/src/lib/bsys.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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) -- 2.39.5