diff options
Diffstat (limited to 'ext/socket')
-rw-r--r-- | ext/socket/extconf.rb | 4 | ||||
-rw-r--r-- | ext/socket/sockport.h | 5 |
2 files changed, 7 insertions, 2 deletions
diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb index 91ac8f6123..46d5120e2e 100644 --- a/ext/socket/extconf.rb +++ b/ext/socket/extconf.rb @@ -2,8 +2,8 @@ require 'mkmf' $LDFLAGS += " -L/usr/local/lib" if File.directory?("/usr/local/lib") $CFLAGS += " -Dss_family=__ss_family -Dss_len=__ss_len" -case PLATFORM -when /mswin32/ +case RUBY_PLATFORM +when /mswin32|mingw/ test_func = "WSACleanup" have_library("wsock32", "WSACleanup") have_func("closesocket") diff --git a/ext/socket/sockport.h b/ext/socket/sockport.h index 1639fcf828..e3750816c6 100644 --- a/ext/socket/sockport.h +++ b/ext/socket/sockport.h @@ -40,4 +40,9 @@ # define SET_SIN_LEN(si,len) #endif +#ifndef IN_MULTICAST +# define IN_CLASSD(i) (((long)(i) & 0xf0000000) == 0xe0000000) +# define IN_MULTICAST(i) IN_CLASSD(i) +#endif + #endif |