Added patch to fix compile error when O_CLOEXEC is not defined.

This commit is contained in:
Sebastian Lackner
2017-03-05 19:38:10 +01:00
parent 734b40739a
commit f61db43e7f
3 changed files with 55 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
From 9cdd8a9d8249736dc06f43edb70ca52a7ac63851 Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 5 Mar 2017 19:37:00 +0100
Subject: qcap: Fix compile error when O_CLOEXEC is not defined.
---
dlls/qcap/v4l.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/dlls/qcap/v4l.c b/dlls/qcap/v4l.c
index d67df73b0cd..bbe3a8b1da5 100644
--- a/dlls/qcap/v4l.c
+++ b/dlls/qcap/v4l.c
@@ -71,6 +71,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(qcap_v4l);
#ifdef VIDIOCMCAPTURE
+#ifndef O_CLOEXEC
+#define O_CLOEXEC 0
+#endif
+
static typeof(open) *video_open = open;
static typeof(close) *video_close = close;
static typeof(ioctl) *video_ioctl = ioctl;
@@ -806,6 +810,7 @@ Capture * qcap_driver_init( IPin *pOut, USHORT card )
goto error;
}
+ fcntl(capBox->fd, F_SETFD, FD_CLOEXEC);
memset(&capa, 0, sizeof(capa));
if (xioctl(capBox->fd, VIDIOCGCAP, &capa) == -1)
--
2.11.0

View File

@@ -0,0 +1 @@
Fixes: [42478] Fix compile error when O_CLOEXEC is not defined