From f68379ec5abe621a1e85f490b76bbc53b029f130 Mon Sep 17 00:00:00 2001 From: czurnieden Date: Sat, 18 May 2024 23:29:05 +0200 Subject: [PATCH] Check if valgrind.h exists --- demo/test.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/demo/test.c b/demo/test.c index 315b2788..1c89ca40 100644 --- a/demo/test.c +++ b/demo/test.c @@ -5,8 +5,17 @@ #include "s_mp_rand_jenkins.c" /* TODO: Make it an environment variable via main.yml? - This is for testing only, so no to add checks to the build process. */ -#include + This is for testing only, so no reason to add checks to the build process. */ +#ifdef __has_include +# if __has_include () +# include +# endif +#else +# define RUNNING_ON_VALGRIND 1 +#endif +#else +# define RUNNING_ON_VALGRIND 1 +#endif static long rand_long(void) {