summaryrefslogtreecommitdiff
path: root/src/libsystemd/sd-event/sd-event.c
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2016-04-18 03:45:42 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2016-04-17 21:45:42 -0400
commit6f7202cfd512d18f561af6708fe0823c9545f674 (patch)
treea64a51fad048ea0cb2663b0c27b531575751f3b0 /src/libsystemd/sd-event/sd-event.c
parent746af6e0b5aaed999be912e48505d3edc2cf874a (diff)
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 systemd/src/basic/time-util.c:70, function now(). Aborting.
Diffstat (limited to 'src/libsystemd/sd-event/sd-event.c')
-rw-r--r--src/libsystemd/sd-event/sd-event.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c
index 9fd744768d..79b98c293c 100644
--- a/src/libsystemd/sd-event/sd-event.c
+++ b/src/libsystemd/sd-event/sd-event.c
@@ -2527,7 +2527,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++) {