diff --git a/ext/extconf.rb b/ext/extconf.rb index 9bf1c2e5f..d9b7b38bb 100644 --- a/ext/extconf.rb +++ b/ext/extconf.rb @@ -60,6 +60,10 @@ if dlldir && RbConfig::CONFIG["RPATHFLAG"].to_s.empty? append_ldflags "-Wl,-rpath,#{dlldir.quote}" end + + if /mswin/ =~ RUBY_PLATFORM + $libs = append_library($libs, 'ws2_32') + end end $stderr.puts "Using libpq from #{dlldir}"