[vlc-commits] [Git][videolan/vlc][3.0.x] 3 commits: Revert "contrib: remove patches to disable GetHandleInformation() calls in UWP"
Steve Lhomme (@robUx4)
gitlab at videolan.org
Thu Nov 28 10:11:12 UTC 2024
Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC
Commits:
f43852ba by Steve Lhomme at 2024-11-28T09:26:32+00:00
Revert "contrib: remove patches to disable GetHandleInformation() calls in UWP"
This reverts commit 7d45e4312be8c0426e8ffe31a8ffc0313467de33.
On 3.0 we target older UWP versions where it's not available (19H1).
- - - - -
b346cd6e by Steve Lhomme at 2024-11-28T09:26:32+00:00
CI: update the Docker image for UWP
It's the latest (and last) version of this image.
- - - - -
0e6f874d by Steve Lhomme at 2024-11-28T09:26:32+00:00
CI: test the UWP with a x86 target
It's the target that gives the most problem, even when x64 works.
Co-authored-by: Martin Finkel <martin at videolabs.io>
- - - - -
3 changed files:
- + contrib/src/gnutls/0001-fcntl-do-not-call-GetHandleInformation-in-Winstore-a.patch
- contrib/src/gnutls/rules.mak
- extras/ci/gitlab-ci.yml
Changes:
=====================================
contrib/src/gnutls/0001-fcntl-do-not-call-GetHandleInformation-in-Winstore-a.patch
=====================================
@@ -0,0 +1,41 @@
+From 0c8ca1736ee07c7d7dbce05108120cf4f8937bd0 Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <robux4 at ycbcr.xyz>
+Date: Thu, 4 Jun 2020 10:15:38 +0200
+Subject: [PATCH] fcntl: do not call GetHandleInformation() in Winstore apps
+
+The API is forbidden [1] and HANDLE_FLAG_INHERIT would never be set as exec()
+is not allowed either [2].
+
+[1] https://docs.microsoft.com/en-us/windows/win32/api/handleapi/nf-handleapi-gethandleinformation
+[2] https://docs.microsoft.com/en-us/cpp/cppcx/crt-functions-not-supported-in-universal-windows-platform-apps
+---
+ gl/fcntl.c | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+diff --git a/gl/fcntl.c b/gl/fcntl.c
+index 6b9927ec4..e316ca306 100644
+--- a/gl/fcntl.c
++++ b/gl/fcntl.c
+@@ -229,12 +229,19 @@ fcntl (int fd, int action, /* arg */...)
+ {
+ # if defined _WIN32 && ! defined __CYGWIN__
+ HANDLE handle = (HANDLE) _get_osfhandle (fd);
++# if WINAPI_FAMILY_PARTITION (WINAPI_PARTITION_DESKTOP)
+ DWORD flags;
+ if (handle == INVALID_HANDLE_VALUE
+ || GetHandleInformation (handle, &flags) == 0)
+ errno = EBADF;
+ else
+ result = (flags & HANDLE_FLAG_INHERIT) ? 0 : FD_CLOEXEC;
++# else /* ! WINAPI_PARTITION_DESKTOP */
++ if (handle == INVALID_HANDLE_VALUE)
++ errno = EBADF;
++ else
++ result = 0;
++# endif /* ! WINAPI_PARTITION_DESKTOP */
+ # else /* !W32 */
+ /* Use dup2 to reject invalid file descriptors. No way to
+ access this information, so punt. */
+--
+2.26.0.windows.1
+
=====================================
contrib/src/gnutls/rules.mak
=====================================
@@ -31,6 +31,10 @@ $(TARBALLS)/gnutls-$(GNUTLS_VERSION).tar.xz:
gnutls: gnutls-$(GNUTLS_VERSION).tar.xz .sum-gnutls
$(UNPACK)
+ # fix forbidden UWP call which can't be upstreamed as they won't
+ # differentiate for winstore, only _WIN32_WINNT
+ $(APPLY) $(SRC)/gnutls/0001-fcntl-do-not-call-GetHandleInformation-in-Winstore-a.patch
+
# disable the dllimport in static linking (pkg-config --static doesn't handle Cflags.private)
sed -i.orig -e s/"_SYM_EXPORT __declspec(dllimport)"/"_SYM_EXPORT"/g $(UNPACK_DIR)/lib/includes/gnutls/gnutls.h.in
=====================================
extras/ci/gitlab-ci.yml
=====================================
@@ -15,7 +15,7 @@ default:
variables:
VLC_WIN32_IMAGE: registry.videolan.org/vlc-debian-win32-3.0:20211008142723
VLC_WIN64_IMAGE: registry.videolan.org/vlc-debian-win64-3.0:20211008140026
- VLC_UWP_LLVM_IMAGE: registry.videolan.org/vlc-debian-llvm-uwp:20200706065223
+ VLC_UWP_LLVM_IMAGE: registry.videolan.org/vlc-debian-llvm-uwp:20211020111246
VLC_WIN_LLVM_UCRT_IMAGE: registry.videolan.org/vlc-debian-llvm-ucrt:20241111035123
VLC_DEBIAN_IMAGE: registry.videolan.org/vlc-debian-unstable:20200229201904
VLC_ANDROID_IMAGE: registry.videolan.org/vlc-debian-android-3.0:20230621085943
@@ -139,13 +139,13 @@ win64-arm-llvm:
# branch protection enabled on Windows.
CONFIGFLAGS: --disable-branch-protection
-uwp64-libvlc-llvm:
+uwp32-libvlc-llvm:
extends: .win-common
image:
name: $VLC_UWP_LLVM_IMAGE
variables:
- <<: *variables-win64
- VLCARCH: win64-uwp
+ <<: *variables-win32
+ VLCARCH: win32-uwp
LIBVLC_EXTRA_BUILD_FLAGS: -z
UWP_EXTRA_BUILD_FLAGS: -u -w
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/eb85d062cf9bc101177165efb20e88b87aa4e768...0e6f874df5f0887073c222cd4bf8c3d603a52d1a
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/eb85d062cf9bc101177165efb20e88b87aa4e768...0e6f874df5f0887073c222cd4bf8c3d603a52d1a
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
More information about the vlc-commits
mailing list