mirror of
https://github.com/libevent/libevent.git
synced 2025-01-09 00:56:20 +08:00
Fix util/monotonic_prc_fallback under FreeBSD
Looks like there was garbage, since evutil_configure_monotonic_time_() does not reset evutil_monotonic_timer structure, while in case of fallback it uses two fields from it: - last_time - adjust_monotonic_clock Fixes: https://github.com/libevent/libevent/issues/1495
This commit is contained in:
parent
92ea8476b4
commit
317911a1a0
@ -316,6 +316,8 @@ evutil_configure_monotonic_time_(struct evutil_monotonic_timer *base,
|
||||
const int fallback = flags & EV_MONOT_FALLBACK;
|
||||
struct timespec ts;
|
||||
|
||||
memset(base, 0, sizeof(*base));
|
||||
|
||||
#ifdef CLOCK_MONOTONIC_COARSE
|
||||
if (CLOCK_MONOTONIC_COARSE < 0) {
|
||||
/* Technically speaking, nothing keeps CLOCK_* from being
|
||||
|
Loading…
x
Reference in New Issue
Block a user