]> git.sesse.net Git - vlc/commitdiff
Compilation fixes
authorRémi Denis-Courmont <remi@remlab.net>
Thu, 14 Jul 2011 11:14:24 +0000 (14:14 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Thu, 14 Jul 2011 11:14:24 +0000 (14:14 +0300)
src/posix/thread.c

index eed068768493e22311ea1ce1e902e00e7651770a..05005b2e4db6a819eadd5a2f9600cc7dce47fe3d 100644 (file)
@@ -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
 }