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

@ -293,6 +293,7 @@ patch_enable_all ()
enable_oleaut32_x86_64_Marshaller="$1"
enable_opengl32_Revert_Disable_Ext="$1"
enable_opengl32_glDebugMessageCallback="$1"
enable_qcap_O_CLOEXEC="$1"
enable_quartz_MediaSeeking_Positions="$1"
enable_quartz_Silence_FIXMEs="$1"
enable_rasapi32_RasEnumDevicesA="$1"
@ -1098,6 +1099,9 @@ patch_enable ()
opengl32-glDebugMessageCallback)
enable_opengl32_glDebugMessageCallback="$2"
;;
qcap-O_CLOEXEC)
enable_qcap_O_CLOEXEC="$2"
;;
quartz-MediaSeeking_Positions)
enable_quartz_MediaSeeking_Positions="$2"
;;
@ -6418,6 +6422,21 @@ if test "$enable_opengl32_glDebugMessageCallback" -eq 1; then
) >> "$patchlist"
fi
# Patchset qcap-O_CLOEXEC
# |
# | This patchset fixes the following Wine bugs:
# | * [#42478] Fix compile error when O_CLOEXEC is not defined
# |
# | Modified files:
# | * dlls/qcap/v4l.c
# |
if test "$enable_qcap_O_CLOEXEC" -eq 1; then
patch_apply qcap-O_CLOEXEC/0001-qcap-Fix-compile-error-when-O_CLOEXEC-is-not-defined.patch
(
printf '%s\n' '+ { "Sebastian Lackner", "qcap: Fix compile error when O_CLOEXEC is not defined.", 1 },';
) >> "$patchlist"
fi
# Patchset quartz-MediaSeeking_Positions
# |
# | Modified files:

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