[PATCH 1/2] avicap32: Fix compilation with older videodev2.h
Martin Storsjo
martin at martin.st
Sat Apr 27 14:06:59 CDT 2019
Older videodev2.h lack the V4L2_CAP_DEVICE_CAPS define and
the device_caps field in the v4l2_capability struct.
Even if Wine is built with --without-v4l2, this code section
is compiled, because it is compiled in as long as the videodev2.h
header is found.
Signed-off-by: Martin Storsjo <martin at martin.st>
---
dlls/avicap32/avicap32_main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dlls/avicap32/avicap32_main.c b/dlls/avicap32/avicap32_main.c
index 1c4170e239..9e2a99d4c7 100644
--- a/dlls/avicap32/avicap32_main.c
+++ b/dlls/avicap32/avicap32_main.c
@@ -129,9 +129,11 @@ static BOOL query_video_device(int devnum, char *name, int namesize, char *versi
memset(&caps, 0, sizeof(caps));
if (xioctl(fd, VIDIOC_QUERYCAP, &caps) != -1) {
BOOL isCaptureDevice;
+#ifdef V4L2_CAP_DEVICE_CAPS
if (caps.capabilities & V4L2_CAP_DEVICE_CAPS)
isCaptureDevice = caps.device_caps & V4L2_CAP_VIDEO_CAPTURE;
else
+#endif
isCaptureDevice = caps.capabilities & V4L2_CAP_VIDEO_CAPTURE;
if (isCaptureDevice) {
lstrcpynA(name, (char *)caps.card, namesize);
--
2.17.1
More information about the wine-devel
mailing list