test/libmpv_lifetime: don't re-define ASAN macro

This commit is contained in:
sfan5 2024-07-16 22:35:47 +02:00
parent 607ad8943b
commit d2e3e6f3bd
1 changed files with 3 additions and 0 deletions

View File

@ -5,11 +5,14 @@
#include <libmpv/client.h>
// detect enabled ASAN on gcc & clang
#ifndef __SANITIZE_ADDRESS__
#if defined(__has_feature)
#if __has_feature(address_sanitizer)
#define __SANITIZE_ADDRESS__
#endif
#endif
#endif
#ifdef __SANITIZE_ADDRESS__
#include <sanitizer/lsan_interface.h>