summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Rytarowski <n54@gmx.com>2017-12-09 00:41:59 +0000
committerKamil Rytarowski <n54@gmx.com>2017-12-09 00:41:59 +0000
commitba5a005732212e5f111094e9aec667da37417624 (patch)
tree6953a00314f4287d8c34bbc860ce8673c988f91e
parentc5950c1f1fba9581f7c5f0329da425e965ce1154 (diff)
Fix test/msan/iconv.cc on NetBSD
Summary: NetBSD still uses the old POSIX iconv(3) signature with the 2nd const argument. Sponsored by <The NetBSD Foundation> Reviewers: joerg, eugenis, vitalybuka Reviewed By: vitalybuka Subscribers: llvm-commits, #sanitizers Tags: #sanitizers Differential Revision: https://reviews.llvm.org/D41017 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@320228 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/msan/iconv.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/msan/iconv.cc b/test/msan/iconv.cc
index e5fbbf924..7beb6a018 100644
--- a/test/msan/iconv.cc
+++ b/test/msan/iconv.cc
@@ -15,8 +15,8 @@ int main(void) {
char inbuf_[100];
strcpy(inbuf_, "sample text");
char outbuf_[100];
-#if defined(__FreeBSD__)
- // FreeBSD's iconv() expects the 2nd argument be of type 'const char**'.
+#if defined(__FreeBSD__) || defined(__NetBSD__)
+ // Some OSes expect the 2nd argument of iconv(3) to be of type const char **
const char *inbuf = inbuf_;
#else
char *inbuf = inbuf_;