Skip to content

Commit

Permalink
Detect aio_abi.h and define EV_USE_LINUXAIO if present.
Browse files Browse the repository at this point in the history
This avoids the need to have kernel headers installed. Fixes #225.
  • Loading branch information
ioquatix committed Sep 24, 2019
1 parent 7a3d634 commit 0e82096
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
8 changes: 0 additions & 8 deletions ext/libev/ev.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,14 +335,6 @@
# define EV_USE_PORT 0
#endif

#ifndef EV_USE_LINUXAIO
# if __linux /* libev currently assumes linux/aio_abi.h is always available on linux */
# define EV_USE_LINUXAIO 1
# else
# define EV_USE_LINUXAIO 0
# endif
#endif

#ifndef EV_USE_INOTIFY
# if __linux && (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 4))
# define EV_USE_INOTIFY EV_FEATURE_OS
Expand Down
2 changes: 2 additions & 0 deletions ext/nio4r/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@

have_header("unistd.h")


$defs << "-DEV_USE_LINUXAIO" if have_header("linux/aio_abi.h")
$defs << "-DEV_USE_SELECT" if have_header("sys/select.h")
$defs << "-DEV_USE_POLL" if have_type("port_event_t", "poll.h")
$defs << "-DEV_USE_EPOLL" if have_header("sys/epoll.h")
Expand Down

0 comments on commit 0e82096

Please sign in to comment.