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, 5 insertions, 0 deletions
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));