[vlc-commits] Compilation fixes

Rémi Denis-Courmont git at videolan.org
Thu Jul 14 19:44:45 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jul 14 14:14:24 2011 +0300| [e06e611f7ebd7d1359215b8d328d39fef282ac47] | committer: Rémi Denis-Courmont

Compilation fixes

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=e06e611f7ebd7d1359215b8d328d39fef282ac47
---

 src/posix/thread.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/posix/thread.c b/src/posix/thread.c
index eed0687..05005b2 100644
--- a/src/posix/thread.c
+++ b/src/posix/thread.c
@@ -134,6 +134,7 @@ static pthread_once_t vlc_clock_once = PTHREAD_ONCE_INIT;
 int nanosleep (struct timespec *, struct timespec *);
 # endif
 
+# define vlc_clock_setup() (void)0
 #endif /* _POSIX_TIMERS */
 
 /**
@@ -352,8 +353,9 @@ void vlc_cond_init (vlc_cond_t *p_condvar)
     vlc_clock_setup ();
     if (unlikely(pthread_condattr_init (&attr)))
         abort ();
+#if (_POSIX_CLOCK_SELECTION > 0)
     pthread_condattr_setclock (&attr, vlc_clock_id);
-
+#endif
     if (unlikely(pthread_cond_init (p_condvar, &attr)))
         abort ();
     pthread_condattr_destroy (&attr);
@@ -956,7 +958,7 @@ mtime_t mdate (void)
 
     if (unlikely(gettimeofday (&tv, NULL) != 0))
         abort ();
-    return (INT64_C(1000000) * tv.tv_sec) + tv.tv_nsec;
+    return (INT64_C(1000000) * tv.tv_sec) + tv.tv_usec;
 
 #endif
 }



More information about the vlc-commits mailing list