[vlc-commits] contrib: gpg-error: Backport a patch to fix building with -fno-common

Martin Storsjö git at videolan.org
Wed Sep 30 09:15:23 CEST 2020


vlc/vlc-3.0 | branch: master | Martin Storsjö <martin at martin.st> | Tue Mar 10 10:52:37 2020 +0200| [1468d691c5611cffd59c33bf1f96c60583050ded] | committer: Martin Storsjö

contrib: gpg-error: Backport a patch to fix building with -fno-common

GCC 10 and Clang 11 are switching to -fno-common by default,
which exposes bugs in libraries that don't use "extern" properly
for variable declarations. Backport a libgpg-error patch (upstream
commit 21dd885eecdee13da1689519e2fc50fcf64f6ef2) that fixes
this issue.

(cherry picked from commit 7c33db1764d627ef064aadb641c46ff68abd5cc3)

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

 contrib/src/gpg-error/rules.mak                 |  1 +
 contrib/src/gpg-error/win32-extern-struct.patch | 11 +++++++++++
 2 files changed, 12 insertions(+)

diff --git a/contrib/src/gpg-error/rules.mak b/contrib/src/gpg-error/rules.mak
index 81cd918ff2..dd8da1f18c 100644
--- a/contrib/src/gpg-error/rules.mak
+++ b/contrib/src/gpg-error/rules.mak
@@ -23,6 +23,7 @@ endif
 	$(APPLY) $(SRC)/gpg-error/no-executable.patch
 	$(APPLY) $(SRC)/gpg-error/win32-unicode.patch
 	$(APPLY) $(SRC)/gpg-error/version-bump-gawk-5.patch
+	$(APPLY) $(SRC)/gpg-error/win32-extern-struct.patch
 	$(MOVE)
 ifdef HAVE_ANDROID
 ifeq ($(ARCH),aarch64)
diff --git a/contrib/src/gpg-error/win32-extern-struct.patch b/contrib/src/gpg-error/win32-extern-struct.patch
new file mode 100644
index 0000000000..5d924910f2
--- /dev/null
+++ b/contrib/src/gpg-error/win32-extern-struct.patch
@@ -0,0 +1,11 @@
+--- libgpg-error-1.27/src/gpgrt-int.h.orig	2020-03-10 10:54:53.127491822 +0200
++++ libgpg-error-1.27/src/gpgrt-int.h	2020-03-10 10:55:48.526283928 +0200
+@@ -359,7 +359,7 @@
+ 
+ #if _WIN32
+ /* Prototypes for w32-estream.c.  */
+-struct cookie_io_functions_s _gpgrt_functions_w32_pollable;
++extern struct cookie_io_functions_s _gpgrt_functions_w32_pollable;
+ int _gpgrt_w32_pollable_create (void *_GPGRT__RESTRICT *_GPGRT__RESTRICT cookie,
+                                 unsigned int modeflags,
+                                 struct cookie_io_functions_s next_functions,



More information about the vlc-commits mailing list