From: Björn Jacke Date: Wed, 1 Sep 2010 09:22:09 +0000 (+0200) Subject: s4/ldb: fix standalone build X-Git-Url: http://git.samba.org/?a=commitdiff_plain;h=d45f901b9304977f7125fefcfc889076471442b4;p=rusty%2Fsamba.git s4/ldb: fix standalone build --- diff --git a/source4/lib/ldb/tools/ldbtest.c b/source4/lib/ldb/tools/ldbtest.c index a885b80c726..94dd2c696dc 100644 --- a/source4/lib/ldb/tools/ldbtest.c +++ b/source4/lib/ldb/tools/ldbtest.c @@ -45,12 +45,16 @@ static struct ldb_cmdline *options; static void _start_timer(void) { - clock_gettime_mono(&tp1); + if (clock_gettime(CUSTOM_CLOCK_MONOTONIC, &tp1) != 0) { + clock_gettime(CLOCK_REALTIME, &tp1); + } } static double _end_timer(void) { - clock_gettime_mono(&tp2); + if (clock_gettime(CUSTOM_CLOCK_MONOTONIC, &tp2) != 0) { + clock_gettime(CLOCK_REALTIME, &tp2); + } return((tp2.tv_sec - tp1.tv_sec) + (tp2.tv_nsec - tp1.tv_nsec)*1.0e-9); }