Re: [PATCH] Fix broken build by checking for used structure definition

Roberto Togni <[email protected]>
Newsgroups gmane.comp.video.mplayer.devel
Message-ID <[email protected]>
On Sat, 20 Feb 2016 19:20:10 +0100
Erik Auerswald <[email protected]> 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
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/mplayer-dev-eng
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.