<div dir="ltr">thanks! </div><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Feb 7, 2016 at 9:40 AM, Dimitry Andric via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: dim<br>
Date: Sun Feb 7 11:40:45 2016<br>
New Revision: 260046<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=260046&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=260046&view=rev</a><br>
Log:<br>
Fix build on FreeBSD after r259741.<br>
<br>
On FreeBSD, the uc_mcontext member of ucontext_t has a member called<br>
mc_err, which corresponds to the Linux member gregs[REG_ERR].<br>
<br>
Reviewed by: rdivacky@FreeBSD.org<br>
<br>
Modified:<br>
compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc<br>
<br>
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc?rev=260046&r1=260045&r2=260046&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc?rev=260046&r1=260045&r2=260046&view=diff</a><br>
==============================================================================<br>
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc (original)<br>
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc Sun Feb 7 11:40:45 2016<br>
@@ -1158,7 +1158,11 @@ void internal_join_thread(void *th) {}<br>
bool GetSigContextWriteFlag(void *context) {<br>
#if defined(__x86_64__) || defined(__i386__)<br>
ucontext_t *ucontext = (ucontext_t*)context;<br>
+#if SANITIZER_FREEBSD<br>
+ return ucontext->uc_mcontext.mc_err & 2;<br>
+#else<br>
return ucontext->uc_mcontext.gregs[REG_ERR] & 2;<br>
+#endif<br>
#else<br>
return false; // FIXME: Implement.<br>
#endif<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>