aboutsummaryrefslogtreecommitdiff
path: root/lib/hostip4.c
diff options
context:
space:
mode:
authorMarcel Raad <Marcel.Raad@teamviewer.com>2017-10-26 20:52:22 +0200
committerMarcel Raad <Marcel.Raad@teamviewer.com>2017-10-27 13:20:13 +0200
commit733190413f6aeffdedf48b85bf43bcfd1038d54b (patch)
tree604c35442cac13ad4e28ca3c602f5722bf77ed6a /lib/hostip4.c
parent36bbbeb7c21c2deb7f157786434a00c36fcf9aa6 (diff)
resolvers: only include anything if needed
This avoids warnings about unused stuff. Closes https://github.com/curl/curl/pull/2023
Diffstat (limited to 'lib/hostip4.c')
-rw-r--r--lib/hostip4.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/hostip4.c b/lib/hostip4.c
index 6a7c6e576..9d6f115ae 100644
--- a/lib/hostip4.c
+++ b/lib/hostip4.c
@@ -22,6 +22,11 @@
#include "curl_setup.h"
+/***********************************************************************
+ * Only for plain IPv4 builds
+ **********************************************************************/
+#ifdef CURLRES_IPV4 /* plain IPv4 code coming up */
+
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
#endif
@@ -53,10 +58,6 @@
#include "curl_memory.h"
#include "memdebug.h"
-/***********************************************************************
- * Only for plain IPv4 builds
- **********************************************************************/
-#ifdef CURLRES_IPV4 /* plain IPv4 code coming up */
/*
* Curl_ipvalid() checks what CURL_IPRESOLVE_* requirements that might've
* been set and returns TRUE if they are OK.