From 5e3e2cd9fda13176f4ae0eb2d544cf5fb93b0fd6 Mon Sep 17 00:00:00 2001 From: David Fort Date: Thu, 22 Apr 2021 09:26:59 +0200 Subject: [PATCH] winpr: fix #6970 Timer changes were wrong when timerfd support is not available (no valid file descriptor returned by GetFd calls). --- winpr/libwinpr/synch/timer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/winpr/libwinpr/synch/timer.c b/winpr/libwinpr/synch/timer.c index bb2fb5444..4204f59ef 100644 --- a/winpr/libwinpr/synch/timer.c +++ b/winpr/libwinpr/synch/timer.c @@ -344,6 +344,7 @@ HANDLE CreateWaitableTimerA(LPSECURITY_ATTRIBUTES lpTimerAttributes, BOOL bManua #if defined(TIMER_IMPL_DISPATCH) || defined(TIMER_IMPL_POSIX) if (!winpr_event_init(&timer->event)) goto fail; + timer->fd = timer->event.fds[0]; #endif #if defined(TIMER_IMPL_DISPATCH)