blob: 505c9e6252fb99ddbaeb42269e318ff364765d31 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
# frozen_string_literal: false
require 'mkmf'
target = "io/nonblock"
unless RUBY_ENGINE == 'ruby'
File.write("Makefile", dummy_makefile($srcdir).join(""))
return
end
have_func("rb_io_descriptor", "ruby/io.h")
hdr = %w"fcntl.h"
if have_macro("O_NONBLOCK", hdr) and
(have_macro("F_GETFL", hdr) or have_macro("F_SETFL", hdr))
create_makefile(target)
end
|