From: Mark Wooding Date: Mon, 2 Oct 2017 12:47:24 +0000 (+0100) Subject: base/ct-test.in: Don't call Valgrind macros unless we found the headers. X-Git-Tag: 2.4.2~20 X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb/commitdiff_plain/58ad700d859210eb8eee3807950aa7492ac4797e base/ct-test.in: Don't call Valgrind macros unless we found the headers. Oops. --- 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 -------------------------------------------------*/