diff options
Diffstat (limited to 'test/msan/iconv.cc')
-rw-r--r-- | test/msan/iconv.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/test/msan/iconv.cc b/test/msan/iconv.cc index ea6958b79b96..c2da938169b3 100644 --- a/test/msan/iconv.cc +++ b/test/msan/iconv.cc @@ -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_); |