weston build on older linuxes, where CLOCK_BOOTTIME is not available. trivial patch attached.

Daniel Stone daniel at fooishbar.org
Tue Mar 3 08:09:05 PST 2015


Hi,

On 3 March 2015 at 14:02, Pekka Paalanen <ppaalanen at gmail.com> wrote:
> On Thu, 26 Feb 2015 00:12:32 +0000
> Volker Eckert <volrek at gmail.com> wrote:
>> i can successfully build weston on debian 7 (kernel 3.2.0-4, glibc 2.13-38), if i make the use of CLOCK_BOOTTIME conditional on its availabilty (see patch). this might also apply on other older systems (certainly centos 6.5 is affected) and in terms of portability it probably makes sense to #ifdef all of the linux specific ones in the first place (?)
>
> oh right. Could you move the #ifdefs to the beginning of the line, not
> indented, and post the patch inline in proper git style, please?
>
> With that fixed:
> Reviewed-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
>
> I'm not sure it makes sense to #ifdef everything Linux specific, we use
> stuff like signalfd and timerfd among other things, and epoll. Making
> Weston portable outside Linux would be a much much bigger task, and I'm
> not sure it is worth it.

Or, even better:
#ifndef CLOCK_BOOTTIME
#define CLOCK_BOOTTIME 7
#endif

This is essentially ABI, so I don't see the harm in just defining it,
and it does make builds a bit more predictable; similar spirit to
weston-egl-ext.h.

Cheers,
Daniel


More information about the wayland-devel mailing list