summaryrefslogtreecommitdiffstats
path: root/ext/socket
diff options
context:
space:
mode:
Diffstat (limited to 'ext/socket')
-rw-r--r--ext/socket/extconf.rb19
1 files changed, 14 insertions, 5 deletions
diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb
index 357025cbb..e888b2a19 100644
--- a/ext/socket/extconf.rb
+++ b/ext/socket/extconf.rb
@@ -323,11 +323,20 @@ if $getaddr_info_ok and have_func("getaddrinfo") and have_func("getnameinfo")
have_getaddrinfo = true
else
if try_link(<<EOF)
-#include <sys/types.h>
-#include <netdb.h>
-#include <string.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
+#ifndef _WIN32
+# include <sys/types.h>
+# include <netdb.h>
+# include <string.h>
+# include <sys/socket.h>
+# include <netinet/in.h>
+#else
+# include <windows.h>
+# ifdef _WIN32_WCE
+# include <winsock.h>
+# else
+# include <winsock.h>
+# endif
+#endif
int
main()
{