]> sjero.net Git - wget/blobdiff - src/host.c
[svn] Generalize connect_with_timeout into run_with_timeout.
[wget] / src / host.c
index 23685f96d7b170818c93abd4b870db4c1950d6f0..45455bf023559e1ecf038840d74fd402d37901bb 100644 (file)
@@ -18,7 +18,10 @@ along with Wget; if not, write to the Free Software
 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 #include <config.h>
+
+#ifndef WINDOWS
 #include <netdb.h>
+#endif
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -173,7 +176,7 @@ address_list_from_addrinfo (struct addrinfo *ai)
   for (i = 0, ai = ai_head; ai; ai = ai->ai_next)
     if (ai->ai_family == AF_INET6) 
       {
-       struct sockaddr_in6 *sin6 = (struct sockaddr_in6*)ai->ai_addr;
+       struct sockaddr_in6 *sin6 = (struct sockaddr_in6 *)ai->ai_addr;
        memcpy (al->addresses + i, &sin6->sin6_addr, 16);
        ++i;
       } 
@@ -548,6 +551,10 @@ lookup_host (const char *host, int silent)
   if (!silent)
     logprintf (LOG_VERBOSE, _("Resolving %s... "), host);
 
+  /* Host name lookup goes on below.  #### We should implement
+     getaddrinfo_with_timeout and gethostbyname_with_timeout the same
+     way connect.c implements connect_with_timeout.  */
+
 #ifdef INET6
   {
     struct addrinfo hints, *ai;