diff options
author | Lennart Poettering <lennart@poettering.net> | 2022-03-28 16:41:10 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2022-03-28 16:55:41 +0200 |
commit | ba4e0427e955a648e24f6506d0cb92857c84b85d (patch) | |
tree | 78d563c6d8b36fab7b7d53997d5a27f55cad10d6 /src/libsystemd-network/sd-radv.c | |
parent | ec4954d934c67c315669eff5593a68fd402a63e8 (diff) | |
download | systemd-ba4e0427e955a648e24f6506d0cb92857c84b85d.tar.gz |
time-util: assume CLOCK_BOOTTIME always exists
Let's raise our supported baseline a bit: CLOCK_BOOTTIME started to work
with timerfd in kernel 3.15 (i.e. back in 2014), let's require support
for it now.
This will raise our baseline only modestly from 3.13 → 3.15.
Diffstat (limited to 'src/libsystemd-network/sd-radv.c')
-rw-r--r-- | src/libsystemd-network/sd-radv.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsystemd-network/sd-radv.c b/src/libsystemd-network/sd-radv.c index 370a10a013..7b5c12e489 100644 --- a/src/libsystemd-network/sd-radv.c +++ b/src/libsystemd-network/sd-radv.c @@ -181,7 +181,7 @@ static int radv_send(sd_radv *ra, const struct in6_addr *dst, usec_t lifetime_us assert(ra); assert(router_lifetime_is_valid(lifetime_usec)); - r = sd_event_now(ra->event, clock_boottime_or_monotonic(), &time_now); + r = sd_event_now(ra->event, CLOCK_BOOTTIME, &time_now); if (r < 0) return r; @@ -321,7 +321,7 @@ static int radv_timeout(sd_event_source *s, uint64_t usec, void *userdata) { assert(ra->event); assert(router_lifetime_is_valid(ra->lifetime_usec)); - r = sd_event_now(ra->event, clock_boottime_or_monotonic(), &time_now); + r = sd_event_now(ra->event, CLOCK_BOOTTIME, &time_now); if (r < 0) goto fail; @@ -357,7 +357,7 @@ static int radv_timeout(sd_event_source *s, uint64_t usec, void *userdata) { log_radv(ra, "Next Router Advertisement in %s", FORMAT_TIMESPAN(timeout, USEC_PER_SEC)); r = event_reset_time(ra->event, &ra->timeout_event_source, - clock_boottime_or_monotonic(), + CLOCK_BOOTTIME, usec_add(time_now, timeout), MSEC_PER_SEC, radv_timeout, ra, ra->event_priority, "radv-timeout", true); @@ -409,7 +409,7 @@ int sd_radv_start(sd_radv *ra) { return 0; r = event_reset_time(ra->event, &ra->timeout_event_source, - clock_boottime_or_monotonic(), + CLOCK_BOOTTIME, 0, 0, radv_timeout, ra, ra->event_priority, "radv-timeout", true); |