[compiler-rt] r310182 - Add NetBSD support in sanitizer_errno.h

Kamil Rytarowski via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 5 11:10:51 PDT 2017


Author: kamil
Date: Sat Aug  5 11:10:51 2017
New Revision: 310182

URL: http://llvm.org/viewvc/llvm-project?rev=310182&view=rev
Log:
Add NetBSD support in sanitizer_errno.h

Summary:
NetBSD ships with __errno (value for __errno_location) like Android.

Part of the code inspired by the original work on libsanitizer in GCC 5.4 by Christos Zoulas.

Sponsored by <The NetBSD Foundation>

Reviewers: joerg, vitalybuka, fjricci, kcc, filcab

Reviewed By: vitalybuka

Subscribers: llvm-commits, srhines, kubamracek, #sanitizers

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D36360

Modified:
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_errno.h

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_errno.h
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_errno.h?rev=310182&r1=310181&r2=310182&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_errno.h (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_errno.h Sat Aug  5 11:10:51 2017
@@ -24,7 +24,7 @@
 
 #if SANITIZER_FREEBSD || SANITIZER_MAC
 #  define __errno_location __error
-#elif SANITIZER_ANDROID
+#elif SANITIZER_ANDROID || SANITIZER_NETBSD
 #  define __errno_location __errno
 #elif SANITIZER_WINDOWS
 #  define __errno_location _errno




More information about the llvm-commits mailing list