Project

General

Profile

Bug #12071 » cygwin.patch

Fix issue with w32/resolv on cygwin - Panyamin (Benjamin Gueroult), 02/14/2016 01:29 PM

View differences:

lib/resolv.rb 2015-11-10 12:48:14.000000000 +0100 → lib/resolv.rb 2016-01-24 23:46:29.250928900 +0100
class Hosts
begin
raise LoadError unless /mswin|mingw|cygwin/ =~ RUBY_PLATFORM
raise LoadError unless /mswin|mingw/ =~ RUBY_PLATFORM
require 'win32/resolv'
DefaultFileName = Win32::Resolv.get_hosts_path
rescue LoadError
......
if File.exist? filename
config_hash = Config.parse_resolv_conf(filename)
else
if /mswin|cygwin|mingw|bccwin/ =~ RUBY_PLATFORM
if /mswin|mingw|bccwin/ =~ RUBY_PLATFORM
require 'win32/resolv'
search, nameserver = Win32::Resolv.get_resolv_info
config_hash = {}
(1-1/4)