about summary refs log tree commit homepage
path: root/ext/unicorn_http/extconf.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/unicorn_http/extconf.rb')
-rw-r--r--ext/unicorn_http/extconf.rb11
1 files changed, 5 insertions, 6 deletions
diff --git a/ext/unicorn_http/extconf.rb b/ext/unicorn_http/extconf.rb
index d5f81fb..de896fe 100644
--- a/ext/unicorn_http/extconf.rb
+++ b/ext/unicorn_http/extconf.rb
@@ -1,12 +1,8 @@
 # -*- encoding: binary -*-
+# frozen_string_literal: false
 require 'mkmf'
 
-have_macro("SIZEOF_OFF_T", "ruby.h") or check_sizeof("off_t", "sys/types.h")
-have_macro("SIZEOF_SIZE_T", "ruby.h") or check_sizeof("size_t", "sys/types.h")
-have_macro("SIZEOF_LONG", "ruby.h") or check_sizeof("long", "sys/types.h")
-have_func("rb_str_set_len", "ruby.h") or abort 'Ruby 1.9.3+ required'
-have_func("rb_hash_clear", "ruby.h") # Ruby 2.0+
-have_func("gmtime_r", "time.h")
+have_func("rb_hash_clear", "ruby.h") or abort 'Ruby 2.0+ required'
 
 message('checking if String#-@ (str_uminus) dedupes... ')
 begin
@@ -38,4 +34,7 @@ else
   message("no, needs Ruby 2.6+\n")
 end
 
+if have_func('epoll_create1', %w(sys/epoll.h))
+  have_func('rb_io_descriptor') # Ruby 3.1+
+end
 create_makefile("unicorn_http")