summaryrefslogtreecommitdiff
path: root/wm/icewm/patches/patch-aa
blob: 310b995d2c31646ef76552d6c68de825abde588e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
$NetBSD: patch-aa,v 1.7 2006/05/13 09:24:21 ghen Exp $

--- src/ylocale.cc.orig	2006-05-13 11:05:31.000000000 +0200
+++ src/ylocale.cc
@@ -152,7 +152,11 @@ YUChar *YLocale::unicodeString(const YLC
     char * inbuf((char *) lStr), * outbuf((char *) uStr);
     size_t inlen(lLen), outlen(4 * lLen);
 
-    if (0 > (int) iconv(instance->toUnicode, const_cast<char **>(&inbuf), &inlen, &outbuf, &outlen))
+#if defined(__NetBSD__)
+    if (0 > (int) iconv(instance->toUnicode, const_cast<const char **>(&inbuf), &inlen, &outbuf, &outlen))
+#else
+    if (0 > (int) iconv(instance->toUnicode, &inbuf, &inlen, &outbuf, &outlen))
+#endif
         warn(_("Invalid multibyte string \"%s\": %s"), lStr, strerror(errno));
 
     *((YUChar *) outbuf) = 0;