From 517d799b6f94e60e302806a2daa14c7a4ac3fbbd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tim=20R=C3=BChsen?= <tim.ruehsen@gmx.de>
Date: Fri, 7 Oct 2016 13:24:15 +0200
Subject: [PATCH] Properly include iconv.h

* src/iri.c: Check HAVE_ICONV to include iconv.h
* src/url.c: Same
---
 src/iri.c | 4 +++-
 src/url.c | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/iri.c b/src/iri.c
index d53b343a..8b3e78cd 100644
--- a/src/iri.c
+++ b/src/iri.c
@@ -33,7 +33,9 @@ as that of the covered work.  */
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include <iconv.h>
+#ifdef HAVE_ICONV
+# include <iconv.h>
+#endif
 #include <stringprep.h>
 #include <idna.h>
 #include <idn-free.h>
diff --git a/src/url.c b/src/url.c
index d15fef50..bd6570ad 100644
--- a/src/url.c
+++ b/src/url.c
@@ -43,7 +43,9 @@ as that of the covered work.  */
 #include "host.h"  /* for is_valid_ipv6_address */
 #include "c-strcase.h"
 
-#include <iconv.h>
+#ifdef HAVE_ICONV
+# include <iconv.h>
+#endif
 #include <langinfo.h>
 
 #ifdef __VMS