diff options
author | Hans Wennborg <hans@hanshq.net> | 2018-09-06 08:19:33 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2018-09-06 08:19:33 +0000 |
commit | 57becfe6f69a0b5540f44fc627dce399bea69622 (patch) | |
tree | c46fcb74f42b4915ce0cd9ab33ad9de2edfccac4 | |
parent | f7280442beca04714396be9950b942c845e22220 (diff) |
Merging r341442:
------------------------------------------------------------------------
r341442 | bcain | 2018-09-05 04:15:54 +0200 (Wed, 05 Sep 2018) | 8 lines
Add glibc_prereq to platform limits mmsghdr
sendmmsg requires glibc >= 2.14.
Fixes PR38589.
Review: https://reviews.llvm.org/D51538
------------------------------------------------------------------------
-rw-r--r-- | compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc | 9 |
1 files changed, 5 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 c27055f2aa8..54da635d71f 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc +++ b/compiler-rt/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. |