aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2018-09-11 10:10:03 +0000
committerDimitry Andric <dim@FreeBSD.org>2018-09-11 10:10:03 +0000
commitd2f57ad5222c71d19cb1677419f658c6e43aac7e (patch)
treedf36cf63c1f9b0b2b66f0a532cbf91719a8193ce
parentd6ad2d02b6234d03473f3874bbc0c129bb7586ee (diff)
downloadsrc-vendor/compiler-rt-70.tar.gz
src-vendor/compiler-rt-70.zip
Notes
Notes: svn path=/vendor/compiler-rt/dist-release_70/; revision=338579 svn path=/vendor/compiler-rt/compiler-rt-release_701-r349250/; revision=342119; tag=vendor/compiler-rt/compiler-rt-release_701-r349250
-rw-r--r--lib/sanitizer_common/sanitizer_platform_limits_posix.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
index c27055f2aa80..54da635d71f0 100644
--- a/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
+++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.cc
@@ -1037,7 +1037,11 @@ CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_len);
CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_level);
CHECK_SIZE_AND_OFFSET(cmsghdr, cmsg_type);
-#if SANITIZER_LINUX && (!defined(__ANDROID__) || __ANDROID_API__ >= 21)
+#ifndef __GLIBC_PREREQ
+#define __GLIBC_PREREQ(x, y) 0
+#endif
+
+#if SANITIZER_LINUX && (__ANDROID_API__ >= 21 || __GLIBC_PREREQ (2, 14))
CHECK_TYPE_SIZE(mmsghdr);
CHECK_SIZE_AND_OFFSET(mmsghdr, msg_hdr);
CHECK_SIZE_AND_OFFSET(mmsghdr, msg_len);
@@ -1078,9 +1082,6 @@ COMPILER_CHECK(sizeof(__sanitizer_sigaction) == sizeof(struct sigaction));
// Can't write checks for sa_handler and sa_sigaction due to them being
// preprocessor macros.
CHECK_STRUCT_SIZE_AND_OFFSET(sigaction, sa_mask);
-#ifndef __GLIBC_PREREQ
-#define __GLIBC_PREREQ(x, y) 0
-#endif
#if !defined(__s390x__) || __GLIBC_PREREQ (2, 20)
// On s390x glibc 2.19 and earlier sa_flags was unsigned long, and sa_resv
// didn't exist.