diff options
author | Sami Kerola | 2015-02-10 00:18:09 +0100 |
---|---|---|
committer | Karel Zak | 2015-03-05 10:31:01 +0100 |
commit | 378543e13f93c522b976efddd1610a19a6601b1c (patch) | |
tree | 38467867c9467eb6cc23b91516be9364ef74bb7c /configure.ac | |
parent | flock: add --verbose option (diff) | |
download | kernel-qcow2-util-linux-378543e13f93c522b976efddd1610a19a6601b1c.tar.gz kernel-qcow2-util-linux-378543e13f93c522b976efddd1610a19a6601b1c.tar.xz kernel-qcow2-util-linux-378543e13f93c522b976efddd1610a19a6601b1c.zip |
flock: improve timeout handling
Signal ALRM raised by the timer, and the timer only, will be considered
as a timeout criteria.
Secondly time interval is made to use monotonic clock. Documentation of
ITIMER_REAL is unclear whether that time is affected various sources of
clock skew, or does it even tick when system is suspended.
Reviewed-by: Karel Zak <kzak@redhat.com>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac index 5d2b68503..9dec9d897 100644 --- a/configure.ac +++ b/configure.ac @@ -371,10 +371,16 @@ AC_CHECK_FUNCS([ioperm iopl], [have_io=yes]) AC_CHECK_FUNCS([futimens], [have_futimens=yes]) AC_CHECK_FUNCS([inotify_init1], [have_inotify_init1=yes]) -dnl Old glibc requires -lrt -AC_CHECK_FUNCS(clock_gettime, [], [ - AC_CHECK_LIB(rt, clock_gettime, [ - AC_DEFINE(HAVE_CLOCK_GETTIME, 1) +dnl lib/mononotic.c may require -lrt +AC_CHECK_FUNCS([clock_gettime], + [AC_CHECK_FUNCS([timer_create], [], [ + AC_CHECK_LIB([rt], [timer_create], [ + AC_DEFINE([HAVE_CLOCK_GETTIME], [1]) + CLOCKGETTIME_LIBS="-lrt" + ]) + ])], + [AC_CHECK_LIB([rt], [clock_gettime], [ + AC_DEFINE([HAVE_CLOCK_GETTIME], [1]) CLOCKGETTIME_LIBS="-lrt" ]) ]) |