]> git.sesse.net Git - vlc/commitdiff
Same here
authorRémi Denis-Courmont <rem@videolan.org>
Sat, 15 Sep 2007 17:03:36 +0000 (17:03 +0000)
committerRémi Denis-Courmont <rem@videolan.org>
Sat, 15 Sep 2007 17:03:36 +0000 (17:03 +0000)
include/vlc_threads_funcs.h

index 820eafae0305dc47d9b72f63999d33062dc95dd7..0856692426891f0ee70652d6f5b5190d030cc455 100644 (file)
@@ -507,7 +507,11 @@ static inline int __vlc_cond_wait( const char * psz_file, int i_line,
     /* In debug mode, timeout */
     struct timespec timeout;
 
-    clock_gettime( CLOCK_MONOTONIC, &timeout );
+# if (_POSIX_CLOCK_MONOTONIC - 0 >= 0)
+    if( clock_gettime( CLOCK_MONOTONIC, &timeout ) )
+# endif
+        clock_gettime( CLOCK_REALTIME, &timeout );
+
     timeout.tv_sec += THREAD_COND_TIMEOUT;
 
     i_result = pthread_cond_timedwait( &p_condvar->cond, &p_mutex->mutex,