[compiler-rt] r320221 - NetBSD ships with POSIX strerror_r(3)
Kamil Rytarowski via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 8 16:35:44 PST 2017
Author: kamil
Date: Fri Dec 8 16:35:44 2017
New Revision: 320221
URL: http://llvm.org/viewvc/llvm-project?rev=320221&view=rev
Log:
NetBSD ships with POSIX strerror_r(3)
Summary:
Switch NetBSD from GNU to the POSIX strerror_r(3) interceptor.
Sponsored by <The NetBSD Foundation>
Reviewers: joerg, eugenis, vitalybuka
Reviewed By: vitalybuka
Subscribers: srhines, kubamracek, llvm-commits, #sanitizers
Tags: #sanitizers
Differential Revision: https://reviews.llvm.org/D41019
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc?rev=320221&r1=320220&r2=320221&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc Fri Dec 8 16:35:44 2017
@@ -3413,7 +3413,7 @@ INTERCEPTOR(char *, strerror, int errnum
// * GNU version returns message pointer, which points to either buf or some
// static storage.
#if ((_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !_GNU_SOURCE) || \
- SANITIZER_MAC || SANITIZER_ANDROID
+ SANITIZER_MAC || SANITIZER_ANDROID || SANITIZER_NETBSD
// POSIX version. Spec is not clear on whether buf is NULL-terminated.
// At least on OSX, buf contents are valid even when the call fails.
INTERCEPTOR(int, strerror_r, int errnum, char *buf, SIZE_T buflen) {
More information about the llvm-commits
mailing list