From 518343413fd311a3d95798b2c1d51853fd8d3c85 Mon Sep 17 00:00:00 2001 From: Riku Voipio Date: Sun, 22 Jun 2014 11:25:42 +0100 Subject: linux-user: support timerfd_{create, gettime, settime} syscalls Adds support for the timerfd_create, timerfd_gettime & timerfd_settime syscalls, allowing use of timerfds by target programs. v2: By Riku - added configure check for timerfd and ifdefs for benefit of old distributions like RHEL5. Signed-off-by: Paul Burton Signed-off-by: Riku Voipio --- configure | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'configure') diff --git a/configure b/configure index 283c71cb7..3d0ab1b19 100755 --- a/configure +++ b/configure @@ -3456,6 +3456,20 @@ if compile_prog "" "" ; then sendfile=yes fi +# check for timerfd support (glibc 2.8 and newer) +timerfd=no +cat > $TMPC << EOF +#include + +int main(void) +{ + return(timerfd_create(CLOCK_REALTIME, 0)); +} +EOF +if compile_prog "" "" ; then + timerfd=yes +fi + # Check if tools are available to build documentation. if test "$docs" != "no" ; then if has makeinfo && has pod2man; then @@ -4524,6 +4538,9 @@ fi if test "$sendfile" = "yes" ; then echo "CONFIG_SENDFILE=y" >> $config_host_mak fi +if test "$timerfd" = "yes" ; then + echo "CONFIG_TIMERFD=y" >> $config_host_mak +fi if test "$inotify" = "yes" ; then echo "CONFIG_INOTIFY=y" >> $config_host_mak fi -- cgit v1.2.3