about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--resolv/res_hconf.c2
-rw-r--r--resolv/res_mkquery.c1
3 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 4c31935f6c..30d90e089a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2013-08-27  Roland McGrath  <roland@hack.frob.com>
 
+	* resolv/res_hconf.c [!NOT_IN_libc] (ifaddrs): Declare
+	only under [SIOCGIFCONF && SIOCGIFNETMASK].
+
+	* resolv/res_mkquery.c: Include <sys/time.h>.
+
 	* inet/ifreq.c: Moved to ...
 	* sysdeps/unix/ifreq.c: ... here.
 	* inet/ifreq.c: New file, true stub version.
diff --git a/resolv/res_hconf.c b/resolv/res_hconf.c
index 8ac46380a3..a92751b873 100644
--- a/resolv/res_hconf.c
+++ b/resolv/res_hconf.c
@@ -359,6 +359,7 @@ _res_hconf_init (void)
 
 
 #ifndef NOT_IN_libc
+# if defined SIOCGIFCONF && defined SIOCGIFNETMASK
 /* List of known interfaces.  */
 libc_freeres_ptr (
 static struct netaddr
@@ -373,6 +374,7 @@ static struct netaddr
     } ipv4;
   } u;
 } *ifaddrs);
+# endif
 
 /* Reorder addresses returned in a hostent such that the first address
    is an address on the local subnet, if there is such an address.
diff --git a/resolv/res_mkquery.c b/resolv/res_mkquery.c
index c0798dc54e..6170763fa3 100644
--- a/resolv/res_mkquery.c
+++ b/resolv/res_mkquery.c
@@ -77,6 +77,7 @@ static const char rcsid[] = "$BINDId: res_mkquery.c,v 8.12 1999/10/13 16:39:40 v
 #include <resolv.h>
 #include <stdio.h>
 #include <string.h>
+#include <sys/time.h>
 
 /* Options.  Leave them on. */
 /* #define DEBUG */