summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-21 10:51:14 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-07-21 10:51:14 +0000
commit6f869a57feddab587f32b0bfa1908af9c3a10c9c (patch)
tree666e31055f564661909ec15112b5017e198a08be /ext
parentc0c20ccb519071802e82341f0bb584c9d833b3de (diff)
ruby/win32.h: include windows.h
* include/ruby/win32.h: include windows.h before winsock2.h, because mswsock.h included by the former uses SOCKET defined after it in the latter. fix a build failure with VC6. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51312 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/socket/getaddrinfo.c3
-rw-r--r--ext/socket/getnameinfo.c3
2 files changed, 6 insertions, 0 deletions
diff --git a/ext/socket/getaddrinfo.c b/ext/socket/getaddrinfo.c
index 68f610e..6d6d11f 100644
--- a/ext/socket/getaddrinfo.c
+++ b/ext/socket/getaddrinfo.c
@@ -66,6 +66,9 @@
#endif
#include <unistd.h>
#else
+#if defined(_MSC_VER) && _MSC_VER <= 1200
+#include <windows.h>
+#endif
#include <winsock2.h>
#include <ws2tcpip.h>
#include <io.h>
diff --git a/ext/socket/getnameinfo.c b/ext/socket/getnameinfo.c
index 4da9680..d54a7c8 100644
--- a/ext/socket/getnameinfo.c
+++ b/ext/socket/getnameinfo.c
@@ -59,6 +59,9 @@
#endif
#endif
#ifdef _WIN32
+#if defined(_MSC_VER) && _MSC_VER <= 1200
+#include <windows.h>
+#endif
#include <winsock2.h>
#include <ws2tcpip.h>
#define snprintf _snprintf