summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac1
-rw-r--r--src/tests/debugallocation_test.cc2
2 files changed, 3 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 8f7ea5f..4823cc1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -116,6 +116,7 @@ AC_CHECK_TYPES([Elf32_Versym],,, [#include <elf.h>]) # for vdso_support.h
AC_CHECK_FUNCS(sbrk) # for tcmalloc to get memory
AC_CHECK_FUNCS(geteuid) # for turning off services when run as root
AC_CHECK_FUNCS(fork) # for the pthread_atfork setup
+AC_CHECK_FUNCS(memalign) # for a test case
AC_CHECK_HEADERS(features.h) # for vdso_support.h
AC_CHECK_HEADERS(malloc.h) # some systems define stuff there, others not
AC_CHECK_HEADERS(sys/malloc.h) # where some versions of OS X put malloc.h
diff --git a/src/tests/debugallocation_test.cc b/src/tests/debugallocation_test.cc
index beeb4cf..8e14830 100644
--- a/src/tests/debugallocation_test.cc
+++ b/src/tests/debugallocation_test.cc
@@ -298,6 +298,7 @@ TEST(DebugAllocationTest, HugeAlloc) {
#endif
}
+#ifdef HAVE_MEMALIGN
// based on test program contributed by mikesart@gmail.com aka
// mikesart@valvesoftware.com. See issue-464.
TEST(DebugAllocationTest, ReallocAfterMemalloc) {
@@ -313,6 +314,7 @@ TEST(DebugAllocationTest, ReallocAfterMemalloc) {
int rv = memcmp(stuff, p, sizeof(stuff));
EXPECT_EQ(rv, 0);
}
+#endif
int main(int argc, char** argv) {
// If you run without args, we run the non-death parts of the test.