[vlc-commits] [Git][videolan/vlc][master] contrib: gnutls: fix CertEnumCRLsInStore in UWP builds
Rémi Denis-Courmont (@Courmisch)
gitlab at videolan.org
Sat Sep 25 17:11:13 UTC 2021
Rémi Denis-Courmont pushed to branch master at VideoLAN / VLC
Commits:
540a7a14 by Steve Lhomme at 2021-09-25T15:44:47+00:00
contrib: gnutls: fix CertEnumCRLsInStore in UWP builds
There was a ming32-only check to use LoadLibrary for this call. It was not
supposed to be done on any mingw64 builds. But the define used was only defined
on mingw64 for 64-bits builds.
Fixes https://code.videolan.org/videolan/LibVLCSharp/-/issues/295
Patch from upstream master.
- - - - -
2 changed files:
- + contrib/src/gnutls/0001-fix-mingw64-detection.patch
- contrib/src/gnutls/rules.mak
Changes:
=====================================
contrib/src/gnutls/0001-fix-mingw64-detection.patch
=====================================
@@ -0,0 +1,36 @@
+From f42ec27a26433902c098cf82f7b38d93ca579869 Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <robux4 at ycbcr.xyz>
+Date: Thu, 23 Sep 2021 09:03:50 +0200
+Subject: [PATCH] fix mingw64 detection
+
+__MINGW64__ is only defined for 64 bits builds of mingw64 [1].
+The intended test what to only use the CertEnumCRLsInStoreFunc via LoadLibrary
+for some ancient mingw32 build and never for mingw64.
+
+__MINGW64_VERSION_MAJOR is a proper define to identify mingw64 against mingw32.
+
+[1] https://sourceforge.net/p/predef/wiki/Compilers/
+
+Co-authored-by: Johannes Kauffmann <johanneskauffmann at hotmail.com>
+
+Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>
+---
+ lib/system.h | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/system.h b/lib/system.h
+index 1e8ca7d07..e15c8cd33 100644
+--- a/lib/system.h
++++ b/lib/system.h
+@@ -29,7 +29,7 @@
+ #include <sys/time.h>
+
+ #ifdef _WIN32
+-# if defined(__MINGW32__) && !defined(__MINGW64__) && __MINGW32_MAJOR_VERSION <= 3 && __MINGW32_MINOR_VERSION <= 20
++# if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR) && __MINGW32_MAJOR_VERSION <= 3 && __MINGW32_MINOR_VERSION <= 20
+ # define NEED_CERT_ENUM_CRLS
+ typedef PCCRL_CONTEXT WINAPI(*CertEnumCRLsInStoreFunc) (HCERTSTORE
+ hCertStore,
+--
+2.27.0.windows.1
+
=====================================
contrib/src/gnutls/rules.mak
=====================================
@@ -34,6 +34,9 @@ gnutls: gnutls-$(GNUTLS_VERSION).tar.xz .sum-gnutls
# disable the dllimport in static linking (pkg-config --static doesn't handle Cflags.private)
cd $(UNPACK_DIR) && sed -i.orig -e s/"_SYM_EXPORT __declspec(dllimport)"/"_SYM_EXPORT"/g lib/includes/gnutls/gnutls.h.in
+ # fix i686 UWP builds as they were using CertEnumCRLsInStore via invalid LoadLibrary
+ $(APPLY) $(SRC)/gnutls/0001-fix-mingw64-detection.patch
+
$(call pkg_static,"lib/gnutls.pc.in")
$(UPDATE_AUTOCONFIG)
$(MOVE)
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/540a7a14e008a7d39d59e992d51110bf56509c98
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/540a7a14e008a7d39d59e992d51110bf56509c98
You're receiving this email because of your account on code.videolan.org.
More information about the vlc-commits
mailing list