diff options
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/socket/extconf.rb | 1 | ||||
| -rw-r--r-- | ext/socket/socket.c | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb index 747bb3529..b14fa8efb 100644 --- a/ext/socket/extconf.rb +++ b/ext/socket/extconf.rb @@ -4,7 +4,6 @@ case RUBY_PLATFORM when /(ms|bcc)win32|mingw/ test_func = "WSACleanup" have_library("ws2_32", "WSACleanup") - have_func("closesocket") when /cygwin/ test_func = "socket" when /beos/ diff --git a/ext/socket/socket.c b/ext/socket/socket.c index 096a4e889..b51283962 100644 --- a/ext/socket/socket.c +++ b/ext/socket/socket.c @@ -193,6 +193,11 @@ ruby_getaddrinfo__aix(nodename, servname, hints, res) #define getaddrinfo(node,serv,hints,res) ruby_getaddrinfo__aix((node),(serv),(hints),(res)) #endif +#ifdef HAVE_CLOSESOCKET +#undef close +#define close closesocket +#endif + static VALUE init_sock(sock, fd) VALUE sock; |
