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
Subscribers: llvm-commits, #sanitizers
Tags: #sanitizers
@@ -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_;
