From 2eae7e70749cb795ccf999ac907e4e68dc8f40c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Denis-Courmont?= Date: Sat, 15 Sep 2007 16:48:15 +0000 Subject: [PATCH] Fixes debug build --- include/vlc_threads_funcs.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/vlc_threads_funcs.h b/include/vlc_threads_funcs.h index 1e76778222..820eafae03 100644 --- a/include/vlc_threads_funcs.h +++ b/include/vlc_threads_funcs.h @@ -45,6 +45,7 @@ VLC_EXPORT( int, __vlc_thread_set_priority, ( vlc_object_t *, const char *, int VLC_EXPORT( void, __vlc_thread_ready, ( vlc_object_t * ) ); VLC_EXPORT( void, __vlc_thread_join, ( vlc_object_t *, const char *, int ) ); +#include /***************************************************************************** * vlc_threads_init: initialize threads system @@ -506,7 +507,7 @@ static inline int __vlc_cond_wait( const char * psz_file, int i_line, /* In debug mode, timeout */ struct timespec timeout; - clock_gettime( CLOCK_MONOTONIC, &now ); + clock_gettime( CLOCK_MONOTONIC, &timeout ); timeout.tv_sec += THREAD_COND_TIMEOUT; i_result = pthread_cond_timedwait( &p_condvar->cond, &p_mutex->mutex, @@ -580,7 +581,7 @@ static inline int __vlc_cond_timedwait( const char * psz_file, int i_line, struct timespec ts = { d.quot, d.rem * 1000 }; i_res = pthread_cond_timedwait( &p_condvar->cond, &p_mutex->mutex, &ts ); - if( i_res = ETIMEDOUT ) + if( i_res == ETIMEDOUT ) i_res = 0; /* this error is perfectly normal */ else if ( i_res ) /* other errors = bug */ -- GitLab