[vlc-commits] contrib: gnutls: disable the dllimport forced even in static linking

Steve Lhomme git at videolan.org
Fri Jun 26 12:34:56 CEST 2020


vlc/vlc-3.0 | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue May 19 16:41:16 2020 +0200| [0290d2f98e07d71a35ce720466d50d1a4f8f24b2] | committer: Steve Lhomme

contrib: gnutls: disable the dllimport forced even in static linking

(cherry picked from commit 799db8c8f91e93afd601278f3f4e513d67e1cec6)

Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>

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

 contrib/src/gnutls/gnutls-win32.patch | 11 -----------
 contrib/src/gnutls/rules.mak          |  2 ++
 2 files changed, 2 insertions(+), 11 deletions(-)

diff --git a/contrib/src/gnutls/gnutls-win32.patch b/contrib/src/gnutls/gnutls-win32.patch
index d851d9d7fb..f1b86f9c8a 100644
--- a/contrib/src/gnutls/gnutls-win32.patch
+++ b/contrib/src/gnutls/gnutls-win32.patch
@@ -1,14 +1,3 @@
---- gnutls.old/lib/includes/gnutls/gnutls.h.in	2016-07-01 22:44:49.319398504 +0200
-+++ gnutls/lib/includes/gnutls/gnutls.h.in	2016-07-01 22:48:00.515407625 +0200
-@@ -68,7 +68,7 @@
- #define GNUTLS_CIPHER_ARCFOUR GNUTLS_CIPHER_ARCFOUR_128
- 
- #if !defined(GNUTLS_INTERNAL_BUILD) && defined(_WIN32)
--# define _SYM_EXPORT __declspec(dllimport)
-+# define _SYM_EXPORT
- #else
- # define _SYM_EXPORT
- #endif
 --- gnutls-3.5.16/lib/gnutls.pc.in.orig	2017-12-26 16:20:40.969104489 +0100
 +++ gnutls-3.5.16/lib/gnutls.pc.in	2017-12-26 16:22:53.817108430 +0100
 @@ -19,6 +19,6 @@
diff --git a/contrib/src/gnutls/rules.mak b/contrib/src/gnutls/rules.mak
index c2ee60b5d8..6be8eadc4c 100644
--- a/contrib/src/gnutls/rules.mak
+++ b/contrib/src/gnutls/rules.mak
@@ -24,6 +24,8 @@ gnutls: gnutls-$(GNUTLS_VERSION).tar.xz .sum-gnutls
 	$(APPLY) $(SRC)/gnutls/gnutls-pkgconfig-static.patch
 ifdef HAVE_WIN32
 	$(APPLY) $(SRC)/gnutls/gnutls-win32.patch
+	# 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
 endif
 ifdef HAVE_ANDROID
 	$(APPLY) $(SRC)/gnutls/no-create-time-h.patch



More information about the vlc-commits mailing list