aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/unit_tests/slow_memmem.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/unit_tests/slow_memmem.cpp b/tests/unit_tests/slow_memmem.cpp
index b1a7622b2..2613209f8 100644
--- a/tests/unit_tests/slow_memmem.cpp
+++ b/tests/unit_tests/slow_memmem.cpp
@@ -33,9 +33,13 @@
#include <unistd.h>
#include <string.h>
#include <stdint.h>
-#include <malloc.h>
#include "gtest/gtest.h"
+// Both OS X and FreeBSD don't need malloc.h
+#if !defined(__APPLE__) && !defined(__FreeBSD__)
+ #include <malloc.h>
+#endif
+
//#define TEST_ORIGINAL
//#define VERBOSE