summaryrefslogtreecommitdiff
path: root/lib/ccan
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2012-04-11 08:27:14 +1000
committerAndrew Bartlett <abartlet@samba.org>2012-04-11 02:30:40 +0200
commit73818636e01de66d7a8d98072188a60284a00d00 (patch)
tree29d34c41619200229abb5009e57afcdec76062fa /lib/ccan
parentce5ac20d1979498572d4b6f631801664a8f4a9ee (diff)
downloadsamba-73818636e01de66d7a8d98072188a60284a00d00.tar.gz
samba-73818636e01de66d7a8d98072188a60284a00d00.tar.bz2
samba-73818636e01de66d7a8d98072188a60284a00d00.zip
ccan: Fix failtest on Fedora 16 as stdlib.h does not imply malloc.h
The issue is that there are two different sources of the malloc prototype, and they both need to be included otherwise the failtest overrides chokes on the headers. Andrew Bartlett
Diffstat (limited to 'lib/ccan')
-rw-r--r--lib/ccan/failtest/failtest_override.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/ccan/failtest/failtest_override.h b/lib/ccan/failtest/failtest_override.h
index b056d538d4..7d03188ea9 100644
--- a/lib/ccan/failtest/failtest_override.h
+++ b/lib/ccan/failtest/failtest_override.h
@@ -10,6 +10,10 @@
/* Replacement of allocators. */
#include <stdlib.h>
+#ifdef HAVE_MALLOC_H
+#include <malloc.h>
+#endif
+
#undef calloc
#define calloc(nmemb, size) \
failtest_calloc((nmemb), (size), __FILE__, __LINE__)