diff --git a/ext/rev/extconf.rb b/ext/rev/extconf.rb
index <HASH>..<HASH> 100644
--- a/ext/rev/extconf.rb
+++ b/ext/rev/extconf.rb
@@ -59,7 +59,9 @@ create_makefile('rev_ext')
 
 if have_header('openssl/ssl.h') and RUBY_PLATFORM =~ /mingw|win32/
   print "Note--SSL not yet supported on windows--continuing without SSL support"
-    makefile_contents = File.read 'Makefile'
-      makefile_contents.gsub!('-DHAVE_OPENSSL_SSL_H', '')
-        File.open('Makefile', 'w') { |f| f.write makefile_contents }
-	end
+  makefile_contents = File.read 'Makefile'
+  makefile_contents.gsub!('-DHAVE_OPENSSL_SSL_H', '')
+  makefile_contents.gsub! 'LIBS = $(LIBRUBYARG_SHARED)', 'LIBS = -lws2_32 $(LIBRUBYARG_SHARED)' # for some reason has to come first or ioctlsocket will be mapped to an [inverted] ruby specific version
+
+  File.open('Makefile', 'w') { |f| f.write makefile_contents }
+end
for windoze make it work with <I>