From 6f869a57feddab587f32b0bfa1908af9c3a10c9c Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 21 Jul 2015 10:51:14 +0000 Subject: 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 --- ext/socket/getaddrinfo.c | 3 +++ ext/socket/getnameinfo.c | 3 +++ 2 files changed, 6 insertions(+) (limited to 'ext/socket') diff --git a/ext/socket/getaddrinfo.c b/ext/socket/getaddrinfo.c index 68f610e807..6d6d11fa8f 100644 --- a/ext/socket/getaddrinfo.c +++ b/ext/socket/getaddrinfo.c @@ -66,6 +66,9 @@ #endif #include #else +#if defined(_MSC_VER) && _MSC_VER <= 1200 +#include +#endif #include #include #include diff --git a/ext/socket/getnameinfo.c b/ext/socket/getnameinfo.c index 4da9680ccb..d54a7c8c0d 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 +#endif #include #include #define snprintf _snprintf -- cgit v1.2.3