diff options
| -rw-r--r-- | ChangeLog | 6 | ||||
| -rw-r--r-- | ext/socket/getaddrinfo.c | 4 | ||||
| -rw-r--r-- | ext/socket/getnameinfo.c | 4 | ||||
| -rw-r--r-- | version.h | 2 |
4 files changed, 15 insertions, 1 deletions
@@ -1,3 +1,9 @@ +Fri May 20 23:46:44 2011 NAKAMURA Usaku <usa@ruby-lang.org> + + * ext/socket/{getaddrinfo,getnameinfo}.c: include winsock2.h only when + specified to use winsock2 by user. + this problem is reported by kosaki. + Fri May 20 23:23:45 2011 NAKAMURA Usaku <usa@ruby-lang.org> * ext/socket/socket.c (make_addrinfo): skip IPv6 addresses when ruby diff --git a/ext/socket/getaddrinfo.c b/ext/socket/getaddrinfo.c index 9b82296dba..8381038867 100644 --- a/ext/socket/getaddrinfo.c +++ b/ext/socket/getaddrinfo.c @@ -71,7 +71,11 @@ #include <in.h> #include <netdb.h> #else +#if USE_WINSOCK2 #include <winsock2.h> +#else +#include <winsock.h> +#endif #include <io.h> #endif #include <string.h> diff --git a/ext/socket/getnameinfo.c b/ext/socket/getnameinfo.c index 66f7e8818a..7bbeebf7d8 100644 --- a/ext/socket/getnameinfo.c +++ b/ext/socket/getnameinfo.c @@ -56,7 +56,11 @@ #endif #endif #ifdef _WIN32 +#if USE_WINSOCK2 #include <winsock2.h> +#else +#include <winsock.h> +#endif #define snprintf _snprintf #endif @@ -2,7 +2,7 @@ #define RUBY_RELEASE_DATE "2011-05-21" #define RUBY_VERSION_CODE 187 #define RUBY_RELEASE_CODE 20110521 -#define RUBY_PATCHLEVEL 337 +#define RUBY_PATCHLEVEL 338 #define RUBY_VERSION_MAJOR 1 #define RUBY_VERSION_MINOR 8 |
