diff -urNp libiconv.orig/src/iconv.c libiconv/src/iconv.c
--- libiconv.orig/src/iconv.c	2009-06-21 13:17:33.000000000 +0200
+++ libiconv/src/iconv.c	2009-11-11 05:35:58.000000000 +0100
@@ -26,7 +26,9 @@
 #include <string.h>
 #include <iconv.h>
 #include <errno.h>
-#include <locale.h>
+#ifdef HAVE_SETLOCALE
+# include <locale.h>
+#endif
 #include <fcntl.h>
 
 /* Ensure that iconv_no_i18n does not depend on libintl.  */
