[PATCH] Fix building on musl-libc

Emil Velikov emil.l.velikov at gmail.com
Tue Jan 26 13:32:11 PST 2016


On 20 January 2016 at 03:34, Kylie McClain <somasissounds at gmail.com> wrote:
> libdrm git master fails to compile due to undefined functions/constants
> on musl libc. The attached patches fix it. (I've attached them rather than
> included them in the message since gmail is really bad about ruining patch
> formatting.)
>
> I originally posted these to https://bugs.freedesktop.org/show_bug.cgi?id=93764
> in a different form, and have modified them to Emil's comments on the
> bugzilla entry.
>
> commit 6ec5d220184e46135109923d252ae619068b7eb2
> Author: Kylie McClain <somasis at exherbo.org>
> Date:   Tue Jan 19 22:27:28 2016 -0500
>
>     tests: Include poll.h rather than sys/poll.h
>
>     sys/poll.h is a non-standard location of the poll.h header, and is
>     incorrect on non-glibc libcs. poll.h, however, is defined in SUS (v2)
>     and is more portable.
>
>     http://pubs.opengroup.org/onlinepubs/007908799/xsh/poll.h.html
>
> commit 6e7f12f1977bd13d10d99bc7826c54b692284c38
> Author: Kylie McClain <somasis at exherbo.org>
> Date:   Tue Jan 19 22:24:15 2016 -0500
>
>     kms-steal-crtc: Make use of sys/select.h if available
>
>     On systems using musl libc, FD_ZERO, FD_SET, select, etc. are defined
>     in sys/select.h. This behavior is defined in IEEE Std 1003.1, 2000,
>     http://pubs.opengroup.org/onlinepubs/009696899/basedefs/sys/select.h.html
>     and fixes building kms-steal-crtc on musl libc systems.

Thanks for the patches Kyle. I've scooped the poll.h one and picked a
slightly more extensive fix for the other issue by Raj.

-Emil


More information about the dri-devel mailing list