Web lists-archives.com

Re: [MPlayer-dev-eng] [PATCH] Fix broken build by checking for used structure definition




On Sat, 20 Feb 2016 19:20:10 +0100
Erik Auerswald <auerswal@xxxxxxxxxxxxxxxxx> wrote:

> Hi,
> 
> the attached patch fixes a build error if the header linux/videodev2.h
> defines struct v4l2_ext_controls, but not struct v4l2_query_ext_ctrl. This
> is the case on Ubuntu 14.04.4 LTS, for example.
> 
> Build error:
> 
> ---8<------8<------8<------8<------8<------8<------8<------8<---
> 
> stream/stream_pvr.c: In function 'add_v4l2_ext_control':
> stream/stream_pvr.c:1099:10: error: variable 'qctrl' has initializer but incomplete type
>    struct v4l2_query_ext_ctrl qctrl = { .id = id };
>           ^
> stream/stream_pvr.c:1099:10: error: unknown field 'id' specified in initializer
> stream/stream_pvr.c:1099:10: warning: excess elements in struct initializer [enabled by default]
> stream/stream_pvr.c:1099:10: warning: (near initialization for 'qctrl') [enabled by default]
> stream/stream_pvr.c:1099:30: error: storage size of 'qctrl' isn't known
>    struct v4l2_query_ext_ctrl qctrl = { .id = id };
>                               ^
> stream/stream_pvr.c:1102:27: error: 'VIDIOC_QUERY_EXT_CTRL' undeclared (first use in this function)
>    if (ioctl (pvr->dev_fd, VIDIOC_QUERY_EXT_CTRL, &qctrl) < 0)
>                            ^
> stream/stream_pvr.c:1102:27: note: each undeclared identifier is reported only once for each function it appears in
> stream/stream_pvr.c:1099:30: warning: unused variable 'qctrl' [-Wunused-variable]
>    struct v4l2_query_ext_ctrl qctrl = { .id = id };
>                               ^
> make: *** [stream/stream_pvr.o] Error 1
> make: *** Waiting for unfinished jobs....
> 
> ---8<------8<------8<------8<------8<------8<------8<------8<---
> 
Patch applied, thanks.

Ciao,
 Roberto
_______________________________________________
MPlayer-dev-eng mailing list
MPlayer-dev-eng@xxxxxxxxxxxx
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng