diff options
author | Gisle Vanem <gvanem@broadpark.no> | 2004-08-20 13:45:26 +0000 |
---|---|---|
committer | Gisle Vanem <gvanem@broadpark.no> | 2004-08-20 13:45:26 +0000 |
commit | b17e32baa750d9ce9459e06b144e4ed376dbaa32 (patch) | |
tree | ff1096681439c771456586b8e9e0d542e28ff1ca /ares/ares_init.c | |
parent | cd52b9f0da6ad17287e85e55363248d9f7430ba4 (diff) |
Changes for Watt-32 on Windows. I've assumed Configure
sets the required HAVE_xx defines for non-DOS/Win targets.
Diffstat (limited to 'ares/ares_init.c')
-rw-r--r-- | ares/ares_init.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/ares/ares_init.c b/ares/ares_init.c index 0fbad973b..1d4a015ad 100644 --- a/ares/ares_init.c +++ b/ares/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); |