[PATCH] clients: fix build on Linux
Derek Foreman
derekf at osg.samsung.com
Thu Jan 14 11:47:37 PST 2016
On 14/01/16 09:44 AM, Olivier Fourdan wrote:
> stropts.h is not available on Linux.
Well, this is all fascinating. :)
I'm going to land the first simpler patch that just removes #include
<stropts.h> (with my Reviewed-by)
linux/videodev2.h includes linux/ioctl.h right away, so I think we're
all good.
Thanks for catching this!
Derek
> Check for this header in the configure script and include it only if
> available to avoid a build failure on systems which do not have
> stropts.h.
>
> Signed-off-by: Olivier Fourdan <ofourdan at redhat.com>
> ---
> clients/simple-dmabuf-v4l.c | 2 ++
> configure.ac | 1 +
> 2 files changed, 3 insertions(+)
>
> diff --git a/clients/simple-dmabuf-v4l.c b/clients/simple-dmabuf-v4l.c
> index 2334e09..471cbf2 100644
> --- a/clients/simple-dmabuf-v4l.c
> +++ b/clients/simple-dmabuf-v4l.c
> @@ -34,7 +34,9 @@
>
> #include <drm_fourcc.h>
>
> +#ifdef HAVE_STROPTS_H
> #include <stropts.h>
> +#endif
> #include <sys/mman.h>
> #include <sys/stat.h>
> #include <fcntl.h>
> diff --git a/configure.ac b/configure.ac
> index 97cbfe5..5f8b345 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -366,6 +366,7 @@ if ! test "x$enable_simple_dmabuf_v4l_client" = "xno"; then
> if test "x$have_simple_dmabuf_v4l_client" = "xno" -a "x$enable_simple_dmabuf_v4l_client" = "xyes"; then
> AC_MSG_ERROR([V4L dmabuf client explicitly enabled, but libdrm couldn't be found])
> fi
> + AC_CHECK_HEADERS([stropts.h])
> enable_simple_dmabuf_v4l_client="$have_simple_dmabuf_v4l_client"
> fi
> AM_CONDITIONAL(BUILD_SIMPLE_DMABUF_V4L_CLIENT, test "x$enable_simple_dmabuf_v4l_client" = "xyes")
>
More information about the wayland-devel
mailing list