[sanitizer] Defined SANITIZER_TEST_HAS_PVALLOC only on glibc

This simplifies the condition and makes it work on musl.
This commit is contained in:
Fangrui Song
2020-12-27 21:33:41 -08:00
parent fde3ae88ee
commit 0b56e3cdda

View File

@@ -107,9 +107,7 @@ static inline uint32_t my_rand() {
# define SANITIZER_TEST_HAS_MEMALIGN 0
#endif
#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__ANDROID__) && \
!defined(__NetBSD__) && !defined(_WIN32) && \
!(defined(__sun__) && defined(__svr4__))
#if defined(__GLIBC__)
# define SANITIZER_TEST_HAS_PVALLOC 1
# define SANITIZER_TEST_HAS_MALLOC_USABLE_SIZE 1
#else