From feadfb1e87e87c918358543aaee59760432f6350 Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= Date: Sun, 16 Sep 2007 07:49:52 +0000 Subject: [PATCH] Fix condition variable clock ifdef --- src/misc/threads.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/misc/threads.c b/src/misc/threads.c index 860e8ff579..a7a9b58013 100644 --- a/src/misc/threads.c +++ b/src/misc/threads.c @@ -28,6 +28,9 @@ #include "libvlc.h" #include +#ifdef HAVE_UNISTD_H +# include +#endif #define VLC_THREADS_UNINITIALIZED 0 #define VLC_THREADS_PENDING 1 @@ -464,7 +467,7 @@ int __vlc_cond_init( vlc_object_t *p_this, vlc_cond_t *p_condvar ) if (ret) return ret; -# if defined (_POSIX_CLOCK_MONOTONIC) && (_POSIX_CLOCK_MONOTONIC >= 0) +# if defined (_POSIX_MONOTONIC_CLOCK) && (_POSIX_MONOTONIC_CLOCK - 0 >= 0) /* This must be the same clock as the one in mtime.c */ pthread_condattr_setclock (&attr, CLOCK_MONOTONIC); # endif -- 2.39.2