about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2014-12-28 01:26:00 +0000
committerEric Wong <normalperson@yhbt.net>2014-12-28 01:27:43 +0000
commit159c1ec26428bc6206ea4ac8dcc3f4ea1569793a (patch)
treefb7d4e462bde3770e98e998b86f3700891c46f31
parentac4a8474f4e3b0961b48d27bbe5a020b7aa93442 (diff)
downloadsleepy_penguin-159c1ec26428bc6206ea4ac8dcc3f4ea1569793a.tar.gz
Many systems have inotify_init1 nowadays, so use inotify_init1
if it is available to avoid unnecessary syscalls.
-rw-r--r--ext/sleepy_penguin/extconf.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/sleepy_penguin/extconf.rb b/ext/sleepy_penguin/extconf.rb
index 407c947..eda7fcd 100644
--- a/ext/sleepy_penguin/extconf.rb
+++ b/ext/sleepy_penguin/extconf.rb
@@ -20,6 +20,7 @@ end
 have_type('clockid_t', 'time.h')
 have_func('clock_gettime', 'time.h')
 have_func('epoll_create1', %w(sys/epoll.h))
+have_func('inotify_init1', %w(sys/inotify.h))
 have_func('rb_thread_call_without_gvl')
 have_func('rb_thread_blocking_region')
 have_func('rb_thread_io_blocking_region')