summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/tests
diff options
context:
space:
mode:
authorKamil Rytarowski <n54@gmx.com>2017-08-07 10:59:44 +0000
committerKamil Rytarowski <n54@gmx.com>2017-08-07 10:59:44 +0000
commitacb113dd88f5bdca20e42d611981fb133d40d292 (patch)
treea4a2bf4203f82f5ad17edc9a63f3b8c96f94ac36 /lib/sanitizer_common/tests
parent6f115effabc63ed12b3b597b6e9abfdc1384f6b4 (diff)
Add NetBSD support in sanitizer_test_utils.h
Summary: NetBSD ships with printf_l(3) like FreeBSD. NetBSD does not ship with memalign, pvalloc, malloc with "usable size" and is the same here as Darwin, Android, FreeBSD and Windows. Sponsored by <The NetBSD Foundation> Reviewers: joerg, vitalybuka, kcc, fjricci, filcab Reviewed By: vitalybuka Subscribers: srhines, llvm-commits, emaste, kubamracek, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D36373 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@310248 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/tests')
-rw-r--r--lib/sanitizer_common/tests/sanitizer_test_utils.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/sanitizer_common/tests/sanitizer_test_utils.h b/lib/sanitizer_common/tests/sanitizer_test_utils.h
index b7728d9ea..f8821a15d 100644
--- a/lib/sanitizer_common/tests/sanitizer_test_utils.h
+++ b/lib/sanitizer_common/tests/sanitizer_test_utils.h
@@ -101,8 +101,8 @@ static inline uint32_t my_rand() {
# define SANITIZER_TEST_HAS_POSIX_MEMALIGN 0
#endif
-#if !defined(__APPLE__) && !defined(__FreeBSD__) && \
- !defined(__ANDROID__) && !defined(_WIN32)
+#if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__ANDROID__) && \
+ !defined(__NetBSD__) && !defined(_WIN32)
# define SANITIZER_TEST_HAS_MEMALIGN 1
# define SANITIZER_TEST_HAS_PVALLOC 1
# define SANITIZER_TEST_HAS_MALLOC_USABLE_SIZE 1
@@ -118,7 +118,7 @@ static inline uint32_t my_rand() {
# define SANITIZER_TEST_HAS_STRNLEN 0
#endif
-#if defined(__FreeBSD__)
+#if defined(__FreeBSD__) || defined(__NetBSD__)
# define SANITIZER_TEST_HAS_PRINTF_L 1
#else
# define SANITIZER_TEST_HAS_PRINTF_L 0