Commit 3d87e37e authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Correct requirements for clock_nanosleep()

parent 44cc78b9
...@@ -968,7 +968,7 @@ mtime_t mdate (void) ...@@ -968,7 +968,7 @@ mtime_t mdate (void)
*/ */
void mwait (mtime_t deadline) void mwait (mtime_t deadline)
{ {
#if (_POSIX_TIMERS > 0) #if (_POSIX_CLOCK_SELECTION > 0)
vlc_clock_setup (); vlc_clock_setup ();
/* If the deadline is already elapsed, or within the clock precision, /* If the deadline is already elapsed, or within the clock precision,
* do not even bother the system timer. */ * do not even bother the system timer. */
...@@ -995,8 +995,8 @@ void msleep (mtime_t delay) ...@@ -995,8 +995,8 @@ void msleep (mtime_t delay)
{ {
struct timespec ts = mtime_to_ts (delay); struct timespec ts = mtime_to_ts (delay);
#if (_POSIX_CLOCK_SELECTION > 0)
vlc_clock_setup (); vlc_clock_setup ();
#if (_POSIX_TIMERS > 0)
while (clock_nanosleep (vlc_clock_id, 0, &ts, &ts) == EINTR); while (clock_nanosleep (vlc_clock_id, 0, &ts, &ts) == EINTR);
#else #else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment