ext/kgio/extconf.rb in kgio-2.3.3 vs ext/kgio/extconf.rb in kgio-2.4.0
- old
+ new
@@ -1,9 +1,14 @@
require 'mkmf'
$CPPFLAGS << ' -D_GNU_SOURCE'
$CPPFLAGS << ' -DPOSIX_C_SOURCE=1'
-
+$CPPFLAGS += '-D_POSIX_C_SOURCE=200112L'
+unless have_macro('CLOCK_MONOTONIC', 'time.h')
+ have_func('CLOCK_MONOTONIC', 'time.h')
+end
+have_type('clockid_t', 'time.h')
+have_library('rt', 'clock_gettime', 'time.h')
have_func("poll", "poll.h")
have_func("getaddrinfo", %w(sys/types.h sys/socket.h netdb.h)) or
abort "getaddrinfo required"
have_func("getnameinfo", %w(sys/types.h sys/socket.h netdb.h)) or
abort "getnameinfo required"
@@ -28,7 +33,6 @@
have_func('rb_io_ascii8bit_binmode')
have_func('rb_thread_blocking_region')
have_func('rb_thread_io_blocking_region')
have_func('rb_str_set_len')
-dir_config('kgio')
create_makefile('kgio_ext')