diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | ext/socket/extconf.rb | 5 |
2 files changed, 10 insertions, 2 deletions
@@ -1,3 +1,10 @@ +Mon Feb 7 02:13:05 2005 NAKAMURA Usaku <usa@ruby-lang.org> + + * ext/socket/extconf.rb (sockaddr_storage): winsock2.h have the + definition of struct sockaddr_storage, but socket.c doesn't + include it because this version of ruby still has binary level + compatibility with winsock1. + Mon Feb 7 01:22:50 2005 Nobuyoshi Nakada <nobu@ruby-lang.org> * ext/extmk.rb (extract_makefile): extract previously collected diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb index 7842899520..076f8bf7d7 100644 --- a/ext/socket/extconf.rb +++ b/ext/socket/extconf.rb @@ -108,8 +108,9 @@ end # doug's fix, NOW add -Dss_family... only if required! doug = proc {have_struct_member("struct sockaddr_storage", "ss_family", headers)} -if doug[] or - with_cppflags($CPPFLAGS + " -Dss_family=__ss_family -Dss_len=__ss_len", &doug) +if /mswin32|mingw/ !~ RUBY_PLATFORM and + (doug[] or + with_cppflags($CPPFLAGS + " -Dss_family=__ss_family -Dss_len=__ss_len", &doug)) $defs[-1] = "-DHAVE_SOCKADDR_STORAGE" end |