We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 52efd67 commit e345bc6Copy full SHA for e345bc6
compiler-rt/test/msan/iconv.cpp
@@ -8,14 +8,23 @@
8
#include <stdio.h>
9
#include <errno.h>
10
11
+#if defined(__NetBSD__)
12
+#include <sys/param.h>
13
+#if __NetBSD_Prereq__(9,99,17)
14
+#define NETBSD_POSIX_ICONV 1
15
+#else
16
+#define NETBSD_POSIX_ICONV 0
17
+#endif
18
19
+
20
int main(void) {
21
iconv_t cd = iconv_open("ASCII", "ASCII");
22
assert(cd != (iconv_t)-1);
23
24
char inbuf_[100];
25
strcpy(inbuf_, "sample text");
26
char outbuf_[100];
-#if defined(__NetBSD__)
27
+#if defined(__NetBSD__) && !NETBSD_POSIX_ICONV
28
// Some OSes expect the 2nd argument of iconv(3) to be of type const char **
29
const char *inbuf = inbuf_;
30
#else
0 commit comments