Index: gwlib/charset.c
===================================================================
RCS file: /home/cvs/gateway/gwlib/charset.c,v
retrieving revision 1.29
diff -a -u -r1.29 charset.c
--- gwlib/charset.c	12 Jan 2009 16:46:53 -0000	1.29
+++ gwlib/charset.c	24 Feb 2009 21:39:11 -0000
@@ -612,7 +612,7 @@
     outbytes = sizeof(char) * octstr_len(string) * 4;
     pointer = to_buf = gw_malloc(outbytes + 1);
     memset(to_buf, 0, outbytes + 1);
-    ret = iconv(cd, (char**)&from_buf, &inbytes, &pointer, &outbytes);
+    ret = iconv(cd, (const char**)&from_buf, &inbytes, &pointer, &outbytes);
     iconv_close(cd);
     if (ret != -1) {
         /* conversion succeeded */
@@ -627,7 +627,7 @@
     }
 
     if (errno == EILSEQ) {
-        debug("charset_convert", 0, "Found an invalid multibyte sequence at position <%d>",
+        debug("charset_convert", 0, "Found an invalid multibyte sequence at position <%ld>",
               from_buf - octstr_get_cstr(string));     
     }
     gw_free(to_buf);
