diff --git a/Makefile b/Makefile index fa4f8b29..a6dba611 100644 --- a/Makefile +++ b/Makefile @@ -144,6 +144,9 @@ endif ifeq ($(wildcard ./vendor/ucl/include/.),) $(error ERROR: missing git submodule; run 'git submodule update --init') endif +ifeq ($(wildcard ./vendor/valgrind/include/.),) + $(error ERROR: missing git submodule; run 'git submodule update --init') +endif ifeq ($(wildcard ./vendor/zlib/crc32.c),) $(error ERROR: missing git submodule; run 'git submodule update --init') endif diff --git a/src/conf.h b/src/conf.h index 4f66049a..515a8f39 100644 --- a/src/conf.h +++ b/src/conf.h @@ -175,8 +175,11 @@ ACC_COMPILE_TIME_ASSERT_HEADER((char)(-1) == 255) // -funsigned-char #endif // malloc debuggers -#if (WITH_VALGRIND) -# include +#ifndef WITH_VALGRIND +# define WITH_VALGRIND 1 +#endif +#if (WITH_VALGRIND) && defined(__GNUC__) && !defined(__SANITIZE_ADDRESS__) +# include #endif #if !defined(VALGRIND_MAKE_MEM_DEFINED) # define VALGRIND_MAKE_MEM_DEFINED(addr,len) 0