summaryrefslogtreecommitdiffstats
path: root/ext/socket
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
commit22c0ee6ee22d06ec77e6e0928f1c7ee2bc6f484a (patch)
tree76f7df3dbece8101a1147e45910e0666298ff98a /ext/socket
parentecc30c341265ef89fe254e180d586c487422030c (diff)
downloadruby-22c0ee6ee22d06ec77e6e0928f1c7ee2bc6f484a.tar.gz
ruby-22c0ee6ee22d06ec77e6e0928f1c7ee2bc6f484a.tar.xz
ruby-22c0ee6ee22d06ec77e6e0928f1c7ee2bc6f484a.zip
* ext/socket/extconf.rb: initialize winsock on win32 to avoid error
dialog of OS. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket')
-rw-r--r--ext/socket/extconf.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb
index 0791714e4..7354a0f30 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));