diff --git a/src/tests/heap-checker_unittest.cc b/src/tests/heap-checker_unittest.cc index f63dfed..eeb1df8 100644 --- a/src/tests/heap-checker_unittest.cc +++ b/src/tests/heap-checker_unittest.cc @@ -63,7 +63,11 @@ #include #include + +#ifdef HAVE_EXECINFO_H #include // backtrace +#endif + #include #include // getgrent, getgrnam #include @@ -824,8 +828,11 @@ static void TestLibCAllocate() { strerror(errno); const time_t now = time(NULL); ctime(&now); + +#ifdef HAVE_EXECINFO_H void *stack[1]; backtrace(stack, 1); +#endif if (grplock.TryLock()) { gid_t gid = getgid();