Watt32: fix server init
authorGisle Vanem <gvanem@broadpark.no>
Tue, 15 Feb 2011 16:15:37 +0000 (17:15 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 18 Feb 2011 12:59:00 +0000 (13:59 +0100)
Somewhere in the process, programs using the Watt-32 tcp/ip stack
stopped working.

ares_init.c

index 4c54c86..35e88a2 100644 (file)
@@ -1,6 +1,6 @@
 
 /* Copyright 1998 by the Massachusetts Institute of Technology.
- * Copyright (C) 2007-2010 by Daniel Stenberg
+ * Copyright (C) 2007-2011 by Daniel Stenberg
  *
  * Permission to use, copy, modify, and distribute this
  * software and its documentation for any purpose and without
@@ -832,7 +832,10 @@ DhcpNameServer
      return ARES_ENOMEM;
 
   for (i = 0; def_nameservers[i]; i++)
-      servers[i].addr.addrV4.s_addr = htonl(def_nameservers[i]);
+  {
+    servers[i].addr.addrV4.s_addr = htonl(def_nameservers[i]);
+    servers[i].addr.family = AF_INET;
+  }
   status = ARES_EOF;
 
 #elif defined(ANDROID)