]> git.proxmox.com Git - rustc.git/blobdiff - src/compiler-rt/test/msan/iconv.cc
Imported Upstream version 1.6.0+dfsg1
[rustc.git] / src / compiler-rt / test / msan / iconv.cc
index ea6958b79b96755bc20d7091c444916ef59faf6a..c2da938169b3a35bc1a99b8907c97bc1eded5aae 100644 (file)
@@ -1,5 +1,5 @@
-// RUN: %clangxx_msan -m64 -O0 -g %s -o %t && %run %t
-// RUN: %clangxx_msan -m64 -O0 -g -DPOSITIVE %s -o %t && not %run %t |& FileCheck %s
+// RUN: %clangxx_msan -O0 -g %s -o %t && %run %t
+// RUN: %clangxx_msan -O0 -g -DPOSITIVE %s -o %t && not %run %t |& FileCheck %s
 
 #include <assert.h>
 #include <iconv.h>
@@ -15,7 +15,12 @@ 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**'.
+  const char *inbuf = inbuf_;
+#else
   char *inbuf = inbuf_;
+#endif
   char *outbuf = outbuf_;
   size_t inbytesleft = strlen(inbuf_);
   size_t outbytesleft = sizeof(outbuf_);