[prev in list] [next in list] [prev in thread] [next in thread] 

List:       llvm-commits
Subject:    [PATCH] D51538: Add glibc_prereq to platform limits mmsghdr
From:       Stephen Hines via Phabricator via llvm-commits <llvm-commits () lists ! llvm ! org>
Date:       2018-08-31 22:05:06
Message-ID: a034caa7829354adea7c25a8345d279c () localhost ! localdomain
[Download RAW message or body]

srhines added inline comments.


================
Comment at: lib/sanitizer_common/sanitizer_platform_limits_posix.cc:1044
+
+#if SANITIZER_LINUX && (!defined(__ANDROID__) || __ANDROID_API__ >= 21) && \
__GLIBC_PREREQ (2, 14)  CHECK_TYPE_SIZE(mmsghdr);
----------------
bcain wrote:
> vitalybuka wrote:
> > srhines wrote:
> > > I think this will break for Android, which doesn't define GLIBC_PREREQ. You \
> > > need to put this check in with the `!defined(__ANDROID__)` part.
> > Please move __GLIBC_PREREQ back, under
> > ```
> > #if SANITIZER_LINUX && (!defined(__ANDROID__) || __ANDROID_API__ >= 21)
> > ```
> Oh, right, I think I understand.  Does this make more sense?
> 
> ```
> #ifndef __GLIBC_PREREQ
> #define __GLIBC_PREREQ(x, y) 0
> #endif
> 
> #if SANITIZER_LINUX && (!defined(__ANDROID__) || __ANDROID_API__ >= 21) && \
> (!defined(__GLIBC__) ||  __GLIBC_PREREQ (2, 14)) CHECK_TYPE_SIZE(mmsghdr);
> CHECK_SIZE_AND_OFFSET(mmsghdr, msg_hdr);
> CHECK_SIZE_AND_OFFSET(mmsghdr, msg_len);
> #endif
> ```
I think this will work.


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D51538



_______________________________________________
llvm-commits mailing list
llvm-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic