summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
diff options
context:
space:
mode:
Diffstat (limited to 'compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc')
-rw-r--r--compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
index 1046b62819e..3a31da4dade 100644
--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
@@ -12,7 +12,9 @@
// Sizes and layouts of platform-specific POSIX data structures.
//===----------------------------------------------------------------------===//
-#if defined(__linux__) || defined(__APPLE__)
+
+#include "sanitizer_platform.h"
+#if SANITIZER_LINUX || SANITIZER_MAC
#include "sanitizer_internal_defs.h"
#include "sanitizer_platform_limits_posix.h"
@@ -27,7 +29,7 @@
#include <sys/socket.h>
#include <time.h>
-#if defined(__linux__)
+#if SANITIZER_LINUX
#include <sys/vfs.h>
#include <sys/epoll.h>
#endif // __linux__
@@ -39,14 +41,14 @@ namespace __sanitizer {
unsigned struct_rusage_sz = sizeof(struct rusage);
unsigned struct_tm_sz = sizeof(struct tm);
-#if defined(__linux__)
+#if SANITIZER_LINUX
unsigned struct_rlimit_sz = sizeof(struct rlimit);
unsigned struct_dirent_sz = sizeof(struct dirent);
unsigned struct_statfs_sz = sizeof(struct statfs);
unsigned struct_epoll_event_sz = sizeof(struct epoll_event);
#endif // __linux__
-#if defined(__linux__) && !defined(__ANDROID__)
+#if SANITIZER_LINUX && !SANITIZER_ANDROID
unsigned struct_dirent64_sz = sizeof(struct dirent64);
unsigned struct_rlimit64_sz = sizeof(struct rlimit64);
unsigned struct_statfs64_sz = sizeof(struct statfs64);
OpenPOWER on IntegriCloud