[compiler-rt] r320228 - Fix test/msan/iconv.cc on NetBSD

Kamil Rytarowski via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 8 16:41:59 PST 2017


Author: kamil
Date: Fri Dec  8 16:41:59 2017
New Revision: 320228

URL: http://llvm.org/viewvc/llvm-project?rev=320228&view=rev
Log:
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

Modified:
    compiler-rt/trunk/test/msan/iconv.cc

Modified: compiler-rt/trunk/test/msan/iconv.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/msan/iconv.cc?rev=320228&r1=320227&r2=320228&view=diff
==============================================================================
--- compiler-rt/trunk/test/msan/iconv.cc (original)
+++ compiler-rt/trunk/test/msan/iconv.cc Fri Dec  8 16:41:59 2017
@@ -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_;




More information about the llvm-commits mailing list