]> git.sesse.net Git - vlc/commitdiff
Another attempt at fixing MacOS build
authorRémi Denis-Courmont <rem@videolan.org>
Sat, 15 Sep 2007 17:34:23 +0000 (17:34 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Sat, 15 Sep 2007 17:34:23 +0000 (17:34 +0000)
include/vlc_common.h
include/vlc_threads_funcs.h

index 57aa4212a009ae2d13e2ceeb00e88e359b2ec1c1..bb2901b0a30cc85e311ee4ee78d06ca707370316 100644 (file)
@@ -1226,8 +1226,8 @@ VLC_EXPORT( const char *, VLC_Changeset, ( void ) );
 #include "vlc_messages.h"
 #include "vlc_variables.h"
 #include "vlc_objects.h"
-#include "vlc_threads_funcs.h"
 #include "vlc_mtime.h"
+#include "vlc_threads_funcs.h"
 #include "vlc_modules.h"
 #include "main.h"
 #include "vlc_configuration.h"
index 9398598679ef3de2b25ccda6519f1966ac6b558e..b497e3703ae7299d150ade378e7f15aaf7947f39 100644 (file)
@@ -505,14 +505,10 @@ static inline int __vlc_cond_wait( const char * psz_file, int i_line,
 
 #   ifdef DEBUG
     /* In debug mode, timeout */
-    struct timespec timeout;
-
-# if defined (_POSIX_CLOCK_MONOTONIC) && (_POSIX_CLOCK_MONOTONIC >= 0)
-    if( clock_gettime( CLOCK_MONOTONIC, &timeout ) )
-# endif
-        clock_gettime( CLOCK_REALTIME, &timeout );
-
-    timeout.tv_sec += THREAD_COND_TIMEOUT;
+    struct timespec timeout = {
+        (mdate() / 1000000) + THREAD_COND_TIMEOUT,
+        0 /* 1Hz precision is sufficient here :-) */
+    };
 
     i_result = pthread_cond_timedwait( &p_condvar->cond, &p_mutex->mutex,
                                        &timeout );