/** Set up a character set conversion if we need to */
#ifdef HAVE_ICONV
if (strcasecmp(charset, "us-ascii") && strcasecmp(charset, "utf-8") && strcasecmp(charset, "") ) {
- ic = ctdl_iconv_open("UTF-8", charset);
+ ctdl_iconv_open("UTF-8", charset, &ic);
if (ic == (iconv_t)(-1)) {
lprintf(5, "%s:%d iconv_open() failed: %s\n",
__FILE__, __LINE__, strerror(errno));