summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--adig.c4
-rw-r--r--ahost.c4
-rw-r--r--ares_process.c2
-rw-r--r--setup.h2
4 files changed, 6 insertions, 6 deletions
diff --git a/adig.c b/adig.c
index fb3a432..a0f622a 100644
--- a/adig.c
+++ b/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/ahost.c b/ahost.c
index 40cd084..92eacd7 100644
--- a/ahost.c
+++ b/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_process.c b/ares_process.c
index fb98e70..f34ae9e 100644
--- a/ares_process.c
+++ b/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/setup.h b/setup.h
index 3b97e27..a5899d8 100644
--- a/setup.h
+++ b/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