From 36b2c39205ecd05c9784a90421c6ad2a5f8abf59 Mon Sep 17 00:00:00 2001 From: Jiri Sasek Date: Tue, 7 Aug 2018 18:47:57 +0200 Subject: [PATCH] Fix #4592: xfreerdp can not built with WITH_POSIX_TIMER on __sun --- winpr/libwinpr/synch/timer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/winpr/libwinpr/synch/timer.c b/winpr/libwinpr/synch/timer.c index fb90a3163b3b..1bdeffa23752 100644 --- a/winpr/libwinpr/synch/timer.c +++ b/winpr/libwinpr/synch/timer.c @@ -187,7 +187,7 @@ static void WaitableTimerSignalHandler(int signum, siginfo_t* siginfo, void* arg static int InstallWaitableTimerSignalHandler(void) { - if (!g_WaitableTimerSignalHandlerInstalled) + if (g_WaitableTimerSignalHandlerInstalled == FALSE) { struct sigaction action; sigemptyset(&action.sa_mask); @@ -243,7 +243,7 @@ static int InitializeWaitableTimer(WINPR_TIMER* timer) } #elif defined(__APPLE__) #else - WLog_ERR(TAG, "%s: os specific implementation is missing", __FUNCTION__); + WLog_ERR(TAG, "%s: os specific implementation is missing (TIMERFD)", __FUNCTION__); result = -1; #endif } @@ -265,7 +265,7 @@ static int InitializeWaitableTimer(WINPR_TIMER* timer) #elif defined(__APPLE__) #else - WLog_ERR(TAG, "%s: os specific implementation is missing", __FUNCTION__); + WLog_ERR(TAG, "%s: os specific implementation is missing (POSIX)", __FUNCTION__); result = -1; #endif } @@ -407,7 +407,7 @@ BOOL SetWaitableTimer(HANDLE hTimer, const LARGE_INTEGER* lpDueTime, LONG lPerio timer->pfnCompletionRoutine = pfnCompletionRoutine; timer->lpArgToCompletionRoutine = lpArgToCompletionRoutine; - if (!timer->bInit) + if (timer->bInit == FALSE) { if (InitializeWaitableTimer(timer) < 0) return FALSE;