From ba5a005732212e5f111094e9aec667da37417624 Mon Sep 17 00:00:00 2001 From: Kamil Rytarowski Date: Sat, 9 Dec 2017 00:41:59 +0000 Subject: Fix test/msan/iconv.cc on NetBSD Summary: NetBSD still uses the old POSIX iconv(3) signature with the 2nd const argument. Sponsored by 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 --- test/msan/iconv.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test') 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_; -- cgit v1.2.3