From d555d18278e004f0079a669150eb88dc210563c9 Mon Sep 17 00:00:00 2001 From: Lubomir Rintel Date: Mon, 18 Apr 2016 03:45:42 +0200 Subject: [PATCH] tree-wide: fall back to now(CLOCK_MONOTONIC) if CLOCK_BOOTTIME unsupported (#3037) It was added in 2.6.39, and causes an assertion to fail when running in mock hosted on 2.6.32-based RHEL-6: Assertion 'clock_gettime(map_clock_id(clock_id), &ts) == 0' failed at elogind/src/basic/time-util.c:70, function now(). Aborting. --- src/libelogind/sd-event/sd-event.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libelogind/sd-event/sd-event.c b/src/libelogind/sd-event/sd-event.c index 34d91d844..52ecb8701 100644 --- a/src/libelogind/sd-event/sd-event.c +++ b/src/libelogind/sd-event/sd-event.c @@ -2547,7 +2547,7 @@ _public_ int sd_event_wait(sd_event *e, uint64_t timeout) { } dual_timestamp_get(&e->timestamp); - e->timestamp_boottime = now(CLOCK_BOOTTIME); + e->timestamp_boottime = now(clock_boottime_or_monotonic()); for (i = 0; i < m; i++) { -- 2.30.2