[PATCH] clients: fix build on Linux

Olivier Fourdan ofourdan at redhat.com
Thu Jan 14 07:28:58 PST 2016


Hi Emmanuel,

> POSIX.1-2008 (and likely prior versions), and thus Linux as well,
> define ioctl() in this header, so it seems strange it doesn’t exist on
> your system.

I based my patch on a couple of information I found here:

https://bugzilla.redhat.com/show_bug.cgi?id=439403
https://bugzilla.redhat.com/show_bug.cgi?id=656245

> Linux also defines it in sys/ioctl.h, do you think we should be using
> this one instead of the portable header?

It builds just fine without that include on my system, but I cannot tell for others.

If you reckon some other OS need to include stropts.h, we could check for that in the configure script with an AC_CHECK_HEADERS and include the header only if available with a simple:

#ifdef HAVE_STROPTS_H
#include <stropts.h>
#endif

I'll send an updated patch if you think it's worth it.

Cheers,
Olivier


More information about the wayland-devel mailing list