aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-14 04:37:21 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-07-14 04:37:21 +0000
commit878a3f60b633aca65c5db954720fe230a7a67b33 (patch)
tree76f7df3dbece8101a1147e45910e0666298ff98a
parentbd232e1578e990293dec4daa01ee29027241b109 (diff)
downloadruby-878a3f60b633aca65c5db954720fe230a7a67b33.tar.gz
* ext/socket/extconf.rb: initialize winsock on win32 to avoid error
dialog of OS. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog5
-rw-r--r--ext/socket/extconf.rb5
2 files changed, 10 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 6416630374..f3d65899a6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Mon Jul 14 13:36:15 2008 NAKAMURA Usaku <usa@ruby-lang.org>
+
+ * ext/socket/extconf.rb: initialize winsock on win32 to avoid error
+ dialog of OS.
+
Mon Jul 14 06:02:26 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* lib/optparse.rb (OptionParser#environment): requires shellwords.
diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb
index 0791714e49..7354a0f300 100644
--- a/ext/socket/extconf.rb
+++ b/ext/socket/extconf.rb
@@ -125,6 +125,11 @@ main()
int passive, gaierr, inet4 = 0, inet6 = 0;
struct addrinfo hints, *ai, *aitop;
char straddr[INET6_ADDRSTRLEN], strport[16];
+#ifdef _WIN32
+ WSADATA retdata;
+
+ WSAStartup(MAKEWORD(2, 0), &retdata);
+#endif
for (passive = 0; passive <= 1; passive++) {
memset(&hints, 0, sizeof(hints));