qt: playlist: use item title if available
[vlc.git] / contrib / src / gnutls / 0001-fcntl-do-not-call-GetHandleInformation-in-Winstore-a.patch
blob9175fbed24370fac40f3c30a472a4c34b6fd1a21
1 From 0c8ca1736ee07c7d7dbce05108120cf4f8937bd0 Mon Sep 17 00:00:00 2001
2 From: Steve Lhomme <robux4@ycbcr.xyz>
3 Date: Thu, 4 Jun 2020 10:15:38 +0200
4 Subject: [PATCH] fcntl: do not call GetHandleInformation() in Winstore apps
6 The API is forbidden [1] and HANDLE_FLAG_INHERIT would never be set as exec()
7 is not allowed either [2].
9 [1] https://docs.microsoft.com/en-us/windows/win32/api/handleapi/nf-handleapi-gethandleinformation
10 [2] https://docs.microsoft.com/en-us/cpp/cppcx/crt-functions-not-supported-in-universal-windows-platform-apps
11 ---
12 gl/fcntl.c | 7 +++++++
13 1 file changed, 7 insertions(+)
15 diff --git a/gl/fcntl.c b/gl/fcntl.c
16 index 6b9927ec4..e316ca306 100644
17 --- a/gl/fcntl.c
18 +++ b/gl/fcntl.c
19 @@ -229,12 +229,19 @@ fcntl (int fd, int action, /* arg */...)
21 # if defined _WIN32 && ! defined __CYGWIN__
22 HANDLE handle = (HANDLE) _get_osfhandle (fd);
23 +# if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
24 DWORD flags;
25 if (handle == INVALID_HANDLE_VALUE
26 || GetHandleInformation (handle, &flags) == 0)
27 errno = EBADF;
28 else
29 result = (flags & HANDLE_FLAG_INHERIT) ? 0 : FD_CLOEXEC;
30 +# else /* ! WINAPI_PARTITION_DESKTOP */
31 + if (handle == INVALID_HANDLE_VALUE)
32 + errno = EBADF;
33 + else
34 + result = 0;
35 +# endif /* ! WINAPI_PARTITION_DESKTOP */
36 # else /* !W32 */
37 /* Use dup2 to reject invalid file descriptors. No way to
38 access this information, so punt. */
40 2.26.0.windows.1