[vlc-commits] Correct requirements for clock_nanosleep()

Rémi Denis-Courmont git at videolan.org
Wed Aug 31 23:02:52 CEST 2011


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Aug 31 16:52:21 2011 +0300| [3d87e37e162afe62f3ada730adf7618432d40216] | committer: Rémi Denis-Courmont

Correct requirements for clock_nanosleep()

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

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

diff --git a/src/posix/thread.c b/src/posix/thread.c
index 9064563..8e94ead 100644
--- a/src/posix/thread.c
+++ b/src/posix/thread.c
@@ -968,7 +968,7 @@ mtime_t mdate (void)
  */
 void mwait (mtime_t deadline)
 {
-#if (_POSIX_TIMERS > 0)
+#if (_POSIX_CLOCK_SELECTION > 0)
     vlc_clock_setup ();
     /* If the deadline is already elapsed, or within the clock precision,
      * do not even bother the system timer. */
@@ -995,8 +995,8 @@ void msleep (mtime_t delay)
 {
     struct timespec ts = mtime_to_ts (delay);
 
+#if (_POSIX_CLOCK_SELECTION > 0)
     vlc_clock_setup ();
-#if (_POSIX_TIMERS > 0)
     while (clock_nanosleep (vlc_clock_id, 0, &ts, &ts) == EINTR);
 
 #else



More information about the vlc-commits mailing list