Browse code

Fix Windows buildbot - Only try unicode conversion if libiconv is available

Shawn Webb authored on 2014/05/28 05:33:51
Showing 1 changed files
... ...
@@ -45,7 +45,9 @@ static	char	const	rcsid[] = "$Id: pdf.c,v 1.61 2007/02/12 20:46:09 njh Exp $";
45 45
 #endif
46 46
 #include <zlib.h>
47 47
 
48
+#if HAVE_ICONV
48 49
 #include <iconv.h>
50
+#endif
49 51
 
50 52
 #include <openssl/ssl.h>
51 53
 #include <openssl/err.h>
... ...
@@ -2887,6 +2889,7 @@ static char *pdf_parse_string(const char *objstart, size_t objsize, const char *
2887 2887
         return res;
2888 2888
     }
2889 2889
 
2890
+#if HAVE_ICONV
2890 2891
     buf = cli_calloc(1, inlen);
2891 2892
     if (!(buf))
2892 2893
         return NULL;
... ...
@@ -2927,6 +2930,7 @@ static char *pdf_parse_string(const char *objstart, size_t objsize, const char *
2927 2927
 
2928 2928
     free(p1);
2929 2929
     free(p2);
2930
+#endif
2930 2931
 
2931 2932
     return res;
2932 2933
 }