[vlc-devel] [#10696] Build fails on GNU/Hurd

Rémi Denis-Courmont remi at remlab.net
Tue Feb 18 20:08:10 CET 2014

Le mardi 18 février 2014, 19:57:01 Gabriele Giacone a écrit :
> On Tue, Feb 18, 2014 at 6:02 PM, Rémi Denis-Courmont <remi at remlab.net> 
> > Le mardi 18 février 2014, 17:28:00 Gabriele Giacone a écrit :
> >> posix/thread.c: In function 'vlc_cond_init':
> >> posix/thread.c:332:39: error: 'vlc_clock_id' undeclared (first use in
> >> this function)
> >> 
> >>      pthread_condattr_setclock (&attr, vlc_clock_id);
> > 
> > Your C library header files are screwed up. This implies that _POSIX_TIMER
> > is negative and _POSIX_CLOCK_SELECTION is positive. This is *impossible*
> > to support since we need a clock ID (CLOCK_REALTIME in this case) which
> > comes with _POSIX_TIMER. Indeed, this option combination is explicitly
> > *forbidden* by the specification.
> Not negative, it equals to 0. As already wrote, from [1]

OK, the VLC code assumes that it is non-zero because I did not consider the 
possibility of it being zero, because that did not seem to make much sense.

You can add support for the zero case if you want, but your patch is wrong 

> /* We do not have POSIX timers, but could in future without ABI change.  */
> #define _POSIX_TIMERS 0
> [...]
> /* The monotonic clock might be available.  */
> [...]
> /* The clock selection interfaces are available.  */
> #define _POSIX_CLOCK_SELECTION 200809L

This is a completely illegal and non-sensical combination. POSIX requires 
timers if clock selection is supported, since clock selection instrinsically 
depends on timers. Furthermore POSIX.2008 requires timers and the monotonic 
clock in any case (they are *not* optional).

So as already implied, your system is broken. It is your operating system, not 
VLC, that needs fixing.

Реми Денис-Курмон

More information about the vlc-devel mailing list