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 diff --git a/include/ruby/win32.h b/include/ruby/win32.h index 9daea06323..7bf389d8e1 100644 --- a/include/ruby/win32.h +++ b/include/ruby/win32.h @@ -35,6 +35,9 @@ extern "C++" { /* template without extern "C++" */ #if !defined(_WIN64) && !defined(WIN32) #define WIN32 #endif +#if defined(_MSC_VER) && _MSC_VER <= 1200 +#include +#endif #include #include #if !defined(_MSC_VER) || _MSC_VER >= 1400