[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [PATCH 1/4] Also check _POSIX_TIMERS > 0. Fix build on GNU/Hurd.



Gabriele Giacone, le Tue 18 Feb 2014 00:54:12 +0100, a écrit :
> diff --git a/src/posix/thread.c b/src/posix/thread.c
> index 07fa71e..d49e94c 100644
> --- a/src/posix/thread.c
> +++ b/src/posix/thread.c
> @@ -300,7 +300,7 @@ void vlc_cond_init (vlc_cond_t *p_condvar)
>  
>      if (unlikely(pthread_condattr_init (&attr)))
>          abort ();
> -#if (_POSIX_CLOCK_SELECTION > 0)
> +#if (_POSIX_TIMERS > 0) && (_POSIX_CLOCK_SELECTION > 0)
>      vlc_clock_setup ();
>      pthread_condattr_setclock (&attr, vlc_clock_id);
>  #endif

Well, we do have pthread_condattr_setclock etc. (otherwise we wouldn't
define _POSIX_CLOCK_SELECTION).  From looking at the build error, it
seems the actual error is that vlc_clock_id is not defined, i.e. the
actual issue comes from the fact that the #if at the top of the file
don't match the #if in the source code.

Samuel


Reply to: