summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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__)