[PATCH] D36360: Add NetBSD support in sanitizer_errno.h

Kamil Rytarowski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Aug 5 09:28:34 PDT 2017


krytarowski created this revision.
krytarowski added a project: Sanitizers.
Herald added subscribers: kubamracek, srhines.

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>


Repository:
  rL LLVM

https://reviews.llvm.org/D36360

Files:
  lib/sanitizer_common/sanitizer_errno.h


Index: lib/sanitizer_common/sanitizer_errno.h
===================================================================
--- lib/sanitizer_common/sanitizer_errno.h
+++ lib/sanitizer_common/sanitizer_errno.h
@@ -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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36360.109881.patch
Type: text/x-patch
Size: 462 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170805/eb6a2900/attachment.bin>


More information about the llvm-commits mailing list