[PATCH] D51538: Add glibc_prereq to platform limits mmsghdr
Brian Cain via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 31 05:47:36 PDT 2018
bcain created this revision.
bcain added reviewers: vitalybuka, hans.
Herald added subscribers: Sanitizers, krytarowski, kubamracek, srhines.
sendmmsg requires glibc >= 2.14.
Fixes PR38589.
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D51538
Files:
lib/sanitizer_common/sanitizer_platform_limits_posix.cc
Index: lib/sanitizer_common/sanitizer_platform_limits_posix.cc
===================================================================
--- lib/sanitizer_common/sanitizer_platform_limits_posix.cc
+++ lib/sanitizer_common/sanitizer_platform_limits_posix.cc
@@ -1037,7 +1037,11 @@
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 && (!defined(__ANDROID__) || __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 @@
// 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51538.163515.patch
Type: text/x-patch
Size: 1094 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180831/71e84150/attachment.bin>
More information about the llvm-commits
mailing list