configure.ac: check for clock_gettime and CLOCK_MONOTONIC

Set or clear Makefile variables HAVE_CLOCK_GETTIME and
HAVE_CLOCK_MONOTONIC based upon results of the checks (overriding
default values from config.mak.uname).

CLOCK_MONOTONIC isn't available on RHEL3, but there are still RHEL3
systems being used in production.

Signed-off-by: Reuben Hawkins <reubenhwk@gmail.com>
Reviewed-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Reuben Hawkins
2015-01-08 12:00:56 -08:00
committed by Junio C Hamano
parent 8bd2c972b1
commit a6c3c638ac
4 changed files with 30 additions and 1 deletions

View File

@ -322,7 +322,7 @@ int trace_want(struct trace_key *key)
return !!get_trace_fd(key);
}
#ifdef HAVE_CLOCK_GETTIME
#if defined(HAVE_CLOCK_GETTIME) && defined(HAVE_CLOCK_MONOTONIC)
static inline uint64_t highres_nanos(void)
{