summaryrefslogtreecommitdiff
path: root/sql/sql_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_test.cc')
-rw-r--r--sql/sql_test.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/sql/sql_test.cc b/sql/sql_test.cc
index 6498a52cc09..a217d40246f 100644
--- a/sql/sql_test.cc
+++ b/sql/sql_test.cc
@@ -22,7 +22,11 @@
#include "sql_select.h"
#include <hash.h>
#include <thr_alarm.h>
+#if defined(HAVE_MALLINFO) && defined(HAVE_MALLOC_H)
#include <malloc.h>
+#elif defined(HAVE_MALLINFO) && defined(HAVE_SYS_MALLOC_H)
+#include <sys/malloc.h>
+#endif
/* Intern key cache variables */
extern "C" pthread_mutex_t THR_LOCK_keycache;