Skip to content

Commit cff7dd4

Browse files
committed
A workaround for JRuby to check for the target OS (Fix #69)
Instead of checking for the existence of the necessary function. On JRuby no C compiler is available and this call results in a runtime error.
1 parent 96e2bd1 commit cff7dd4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/win32/resolv/extconf.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
require 'mkmf'
2-
if have_library('iphlpapi', 'GetNetworkParams')
2+
if /cygwin|mingw|mswin/ =~ RbConfig::CONFIG['target_os'] and have_library('iphlpapi', 'GetNetworkParams')
33
create_makefile('win32/resolv')
44
else
55
File.write('Makefile', "all clean install:\n\t@echo Done: $(@)\n")

0 commit comments

Comments
 (0)