summaryrefslogtreecommitdiff
path: root/lib/interception/interception_type_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/interception/interception_type_test.cc')
-rw-r--r--lib/interception/interception_type_test.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/interception/interception_type_test.cc b/lib/interception/interception_type_test.cc
index 98ce2e6af..2b3a6d509 100644
--- a/lib/interception/interception_type_test.cc
+++ b/lib/interception/interception_type_test.cc
@@ -12,9 +12,10 @@
// Compile-time tests of the internal type definitions.
//===----------------------------------------------------------------------===//
-#if defined(__linux__) || defined(__APPLE__)
-
#include "interception.h"
+
+#if SANITIZER_LINUX || SANITIZER_MAC
+
#include <sys/types.h>
#include <stddef.h>
#include <stdint.h>
@@ -24,14 +25,14 @@ COMPILER_CHECK(sizeof(::SSIZE_T) == sizeof(ssize_t));
COMPILER_CHECK(sizeof(::PTRDIFF_T) == sizeof(ptrdiff_t));
COMPILER_CHECK(sizeof(::INTMAX_T) == sizeof(intmax_t));
-#ifndef __APPLE__
+#if !SANITIZER_MAC
COMPILER_CHECK(sizeof(::OFF64_T) == sizeof(off64_t));
#endif
// The following are the cases when pread (and friends) is used instead of
// pread64. In those cases we need OFF_T to match off_t. We don't care about the
// rest (they depend on _FILE_OFFSET_BITS setting when building an application).
-# if defined(__ANDROID__) || !defined _FILE_OFFSET_BITS || \
+# if SANITIZER_ANDROID || !defined _FILE_OFFSET_BITS || \
_FILE_OFFSET_BITS != 64
COMPILER_CHECK(sizeof(::OFF_T) == sizeof(off_t));
# endif