summaryrefslogtreecommitdiff
path: root/ares_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'ares_init.c')
-rw-r--r--ares_init.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/ares_init.c b/ares_init.c
index 0fbad97..1d4a015 100644
--- a/ares_init.c
+++ b/ares_init.c
@@ -16,19 +16,25 @@
#include "setup.h"
#include <sys/types.h>
-#ifdef WIN32
+#if defined(WIN32) && !defined(WATT32)
#include "nameser.h"
#include <iphlpapi.h>
#include <malloc.h>
+
#else
#include <sys/param.h>
+#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
+#endif
+
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <arpa/nameser.h>
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
+#endif
#include <stdio.h>
#include <stdlib.h>
@@ -39,6 +45,10 @@
#include "ares.h"
#include "ares_private.h"
+#ifdef WATT32
+#undef WIN32 /* Redefined in MingW/MSVC headers */
+#endif
+
static int init_by_options(ares_channel channel, struct ares_options *options,
int optmask);
static int init_by_environment(ares_channel channel);