From 58ad700d859210eb8eee3807950aa7492ac4797e Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Mon, 2 Oct 2017 13:47:24 +0100 Subject: [PATCH] base/ct-test.in: Don't call Valgrind macros unless we found the headers. Oops. --- base/ct-test.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/base/ct-test.c b/base/ct-test.c index b4cddc62..e0f62e5f 100644 --- a/base/ct-test.c +++ b/base/ct-test.c @@ -57,7 +57,11 @@ */ void ct_poison(const void *p, size_t sz) - { VALGRIND_MAKE_MEM_UNDEFINED(p, sz); } +{ +#ifdef HAVE_VALGRIND_H + VALGRIND_MAKE_MEM_UNDEFINED(p, sz); +#endif +} /* --- @ct_remedy@ --- * * @@ -74,6 +78,10 @@ void ct_poison(const void *p, size_t sz) */ void ct_remedy(const void *p, size_t sz) - { VALGRIND_MAKE_MEM_DEFINED(p, sz); } +{ +#ifdef HAVE_VALGRIND_H + VALGRIND_MAKE_MEM_DEFINED(p, sz); +#endif +} /*----- That's all, folks -------------------------------------------------*/ -- 2.11.0