aboutsummaryrefslogtreecommitdiff
path: root/ares
diff options
context:
space:
mode:
Diffstat (limited to 'ares')
-rw-r--r--ares/adig.c4
-rw-r--r--ares/ahost.c4
-rw-r--r--ares/ares_process.c2
-rw-r--r--ares/setup.h2
4 files changed, 6 insertions, 6 deletions
diff --git a/ares/adig.c b/ares/adig.c
index fb3a43222..a0f622abd 100644
--- a/ares/adig.c
+++ b/ares/adig.c
@@ -153,8 +153,8 @@ int main(int argc, char **argv)
fd_set read_fds, write_fds;
struct timeval *tvp, tv;
-#ifdef WIN32
- WORD wVersionRequested = MAKEWORD(1,1);
+#ifdef USE_WINSOCK
+ WORD wVersionRequested = MAKEWORD(USE_WINSOCK,USE_WINSOCK);
WSADATA wsaData;
WSAStartup(wVersionRequested, &wsaData);
#endif
diff --git a/ares/ahost.c b/ares/ahost.c
index 40cd08439..92eacd76a 100644
--- a/ares/ahost.c
+++ b/ares/ahost.c
@@ -64,8 +64,8 @@ int main(int argc, char **argv)
struct in_addr addr4;
struct in6_addr addr6;
-#ifdef WIN32
- WORD wVersionRequested = MAKEWORD(1,1);
+#ifdef USE_WINSOCK
+ WORD wVersionRequested = MAKEWORD(USE_WINSOCK,USE_WINSOCK);
WSADATA wsaData;
WSAStartup(wVersionRequested, &wsaData);
#endif
diff --git a/ares/ares_process.c b/ares/ares_process.c
index fb98e70b9..f34ae9e5c 100644
--- a/ares/ares_process.c
+++ b/ares/ares_process.c
@@ -59,7 +59,7 @@
#define TRUE 1
#endif
-#if (defined(WIN32) || defined(WATT32)) && !defined(MSDOS)
+#ifdef USE_WINSOCK
#define GET_ERRNO() WSAGetLastError()
#else
#define GET_ERRNO() errno
diff --git a/ares/setup.h b/ares/setup.h
index 3b97e273e..a5899d883 100644
--- a/ares/setup.h
+++ b/ares/setup.h
@@ -121,7 +121,7 @@
* Typedef our socket type
*/
-#if defined(WIN32) && !defined(WATT32)
+#ifdef USE_WINSOCK
typedef SOCKET ares_socket_t;
#define ARES_SOCKET_BAD INVALID_SOCKET
#else