[vlc-commits] contrib: gnutls: Fix mingw64 detection

Hugo Beauzée-Luyssen git at videolan.org
Mon Apr 4 18:03:45 CEST 2016


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Mon Apr  4 16:53:14 2016 +0200| [f61fbb932423b28ee4de51162419b67679dcb52d] | committer: Hugo Beauzée-Luyssen

contrib: gnutls: Fix mingw64 detection

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f61fbb932423b28ee4de51162419b67679dcb52d
---

 contrib/src/gnutls/gnutls-mingw64.patch |   29 +++++++++++++++++++++++++++++
 contrib/src/gnutls/rules.mak            |    1 +
 2 files changed, 30 insertions(+)

diff --git a/contrib/src/gnutls/gnutls-mingw64.patch b/contrib/src/gnutls/gnutls-mingw64.patch
new file mode 100644
index 0000000..d8eb852
--- /dev/null
+++ b/contrib/src/gnutls/gnutls-mingw64.patch
@@ -0,0 +1,29 @@
+--- gnutls/lib/system.c.orig	2016-04-01 17:15:48.424481273 +0200
++++ gnutls/lib/system.c	2016-04-01 17:15:57.200493470 +0200
+@@ -34,7 +34,7 @@
+ #ifdef _WIN32
+ # include <windows.h>
+ # include <wincrypt.h>
+-# 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
+ typedef PCCRL_CONTEXT WINAPI(*Type_CertEnumCRLsInStore) (HCERTSTORE
+ 							 hCertStore,
+ 							 PCCRL_CONTEXT
+@@ -289,7 +289,7 @@
+ int gnutls_system_global_init()
+ {
+ #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
+ 	HMODULE crypto;
+ 	crypto = LoadLibraryA("Crypt32.dll");
+ 
+@@ -313,7 +313,7 @@
+ void gnutls_system_global_deinit()
+ {
+ #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
+ 	FreeLibrary(Crypt32_dll);
+ #endif
+ #endif
diff --git a/contrib/src/gnutls/rules.mak b/contrib/src/gnutls/rules.mak
index 94cf1f2..05f917d 100644
--- a/contrib/src/gnutls/rules.mak
+++ b/contrib/src/gnutls/rules.mak
@@ -21,6 +21,7 @@ gnutls: gnutls-$(GNUTLS_VERSION).tar.xz .sum-gnutls
 	$(UNPACK)
 ifdef HAVE_WIN32
 	$(APPLY) $(SRC)/gnutls/gnutls-win32.patch
+	$(APPLY) $(SRC)/gnutls/gnutls-mingw64.patch
 endif
 ifdef HAVE_ANDROID
 	$(APPLY) $(SRC)/gnutls/no-create-time-h.patch



More information about the vlc-commits mailing list