summaryrefslogtreecommitdiff
path: root/ares_init.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-07-01 06:58:47 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-07-01 06:58:47 +0000
commitcb0a33076ad3f144228d59a475dc232d9c32fdb5 (patch)
treee3642dc48d510235490ce07abee999be16ff20bf /ares_init.c
parentfcf36da14f5e22e9d052d6f56a4b52fb8d4d88fb (diff)
downloadc-ares-cb0a33076ad3f144228d59a475dc232d9c32fdb5.tar.gz
c-ares-cb0a33076ad3f144228d59a475dc232d9c32fdb5.tar.bz2
c-ares-cb0a33076ad3f144228d59a475dc232d9c32fdb5.zip
Gisle Vanem made this build fine with djgpp and the Watt-32 stack.
Diffstat (limited to 'ares_init.c')
-rw-r--r--ares_init.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/ares_init.c b/ares_init.c
index bd23234..c5e35d0 100644
--- a/ares_init.c
+++ b/ares_init.c
@@ -506,6 +506,24 @@ DhcpNameServer
free(resolvers);
}
+#elif defined(WATT32)
+ int i;
+
+ sock_init();
+ for (i = 0; def_nameservers[i]; i++)
+ ;
+ if (i == 0)
+ return ARES_SUCCESS; /* use localhost DNS server */
+
+ nservers = i;
+ servers = calloc(sizeof(*servers), i);
+ if (!servers)
+ return ARES_ENOMEM;
+
+ for (i = 0; def_nameservers[i]; i++)
+ servers[i].addr.s_addr = htonl(def_nameservers[i]);
+ status = ARES_EOF;
+
#else
{
char *p;