[vlc-commits] contrib: gnutls: Don't use LoadLibraryA
Hugo Beauzée-Luyssen
git at videolan.org
Fri Jul 8 14:51:31 CEST 2016
vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Fri Jul 8 14:48:45 2016 +0200| [aceca94c18c702af5cb0ea15e00de3a117883cc9] | committer: Hugo Beauzée-Luyssen
contrib: gnutls: Don't use LoadLibraryA
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=aceca94c18c702af5cb0ea15e00de3a117883cc9
---
contrib/src/gnutls/gnutls-loadlibrary.patch | 22 ++++++++++++++++++++++
contrib/src/gnutls/rules.mak | 1 +
2 files changed, 23 insertions(+)
diff --git a/contrib/src/gnutls/gnutls-loadlibrary.patch b/contrib/src/gnutls/gnutls-loadlibrary.patch
new file mode 100644
index 0000000..2d9132b
--- /dev/null
+++ b/contrib/src/gnutls/gnutls-loadlibrary.patch
@@ -0,0 +1,22 @@
+--- gnutls/lib/system.c.orig 2016-07-08 14:39:45.104700999 +0200
++++ gnutls/lib/system.c 2016-07-08 14:40:28.276750643 +0200
+@@ -322,7 +322,7 @@
+ #ifdef _WIN32
+ #if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR) && __MINGW32_MAJOR_VERSION <= 3 && __MINGW32_MINOR_VERSION <= 20
+ HMODULE crypto;
+- crypto = LoadLibraryA("Crypt32.dll");
++ crypto = LoadLibrary(TEXT("Crypt32.dll"));
+
+ if (crypto == NULL)
+ return GNUTLS_E_CRYPTO_INIT_FAILED;
+--- gnutls/lib/system-keys-win.c.orig 2016-07-08 14:39:58.336716261 +0200
++++ gnutls/lib/system-keys-win.c 2016-07-08 14:40:12.568732630 +0200
+@@ -1059,7 +1059,7 @@
+ int ret;
+
+ #ifdef DYN_NCRYPT
+- ncrypt_lib = LoadLibraryA("ncrypt.dll");
++ ncrypt_lib = LoadLibrary(TEXT("ncrypt.dll"));
+ if (ncrypt_lib == NULL) {
+ return gnutls_assert_val(GNUTLS_E_CRYPTO_INIT_FAILED);
+ }
diff --git a/contrib/src/gnutls/rules.mak b/contrib/src/gnutls/rules.mak
index 4b61bd6..aacbaf5 100644
--- a/contrib/src/gnutls/rules.mak
+++ b/contrib/src/gnutls/rules.mak
@@ -22,6 +22,7 @@ gnutls: gnutls-$(GNUTLS_VERSION).tar.xz .sum-gnutls
ifdef HAVE_WIN32
$(APPLY) $(SRC)/gnutls/gnutls-win32.patch
$(APPLY) $(SRC)/gnutls/gnutls-mingw64.patch
+ $(APPLY) $(SRC)/gnutls/gnutls-loadlibrary.patch
ifdef HAVE_WINSTORE
$(APPLY) $(SRC)/gnutls/gnutls-winrt.patch
$(APPLY) $(SRC)/gnutls/winrt-topendir.patch
More information about the vlc-commits
mailing list