summaryrefslogtreecommitdiff
path: root/ext/socket/extconf.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/socket/extconf.rb')
-rw-r--r--ext/socket/extconf.rb5
1 files changed, 3 insertions, 2 deletions
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