commit: e82d0a5251dd59099ed8f07308d2b87374ac2afc Author: Alexander Tsoy <alexander <AT> tsoy <DOT> me> AuthorDate: Wed Jan 29 11:57:34 2020 +0000 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> CommitDate: Thu Jan 30 06:33:07 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e82d0a52
x11-misc/x11vnc: fix build with -fno-common Closes: https://bugs.gentoo.org/706840 Signed-off-by: Alexander Tsoy <alexander <AT> tsoy.me> Closes: https://github.com/gentoo/gentoo/pull/14495 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> .../x11vnc/files/x11vnc-0.9.16-fno-common.patch | 45 ++++++++++++++++++++++ x11-misc/x11vnc/x11vnc-0.9.16-r3.ebuild | 3 +- 2 files changed, 47 insertions(+), 1 deletion(-) diff --git a/x11-misc/x11vnc/files/x11vnc-0.9.16-fno-common.patch b/x11-misc/x11vnc/files/x11vnc-0.9.16-fno-common.patch new file mode 100644 index 00000000000..504159efe92 --- /dev/null +++ b/x11-misc/x11vnc/files/x11vnc-0.9.16-fno-common.patch @@ -0,0 +1,45 @@ +From a48b0b1cd887d7f3ae67f525d7d334bd2feffe60 Mon Sep 17 00:00:00 2001 +From: Alexander Tsoy <[email protected]> +Date: Tue, 28 Jan 2020 22:21:01 +0300 +Subject: [PATCH] Fix build with -fno-common + +GCC 10 defaults to -fno-common +--- + src/util.c | 3 +++ + src/util.h | 6 +++--- + 2 files changed, 6 insertions(+), 3 deletions(-) + +diff --git a/src/util.c b/src/util.c +index a82a1a4..6a52ebf 100644 +--- a/src/util.c ++++ b/src/util.c +@@ -47,6 +47,9 @@ int hxl = 0; + #ifdef LIBVNCSERVER_HAVE_LIBPTHREAD + MUTEX(x11Mutex); + MUTEX(scrollMutex); ++MUTEX(clientMutex); ++MUTEX(inputMutex); ++MUTEX(pointerMutex); + #endif + + int nfix(int i, int n); +diff --git a/src/util.h b/src/util.h +index 35c1afd..99b5dd1 100644 +--- a/src/util.h ++++ b/src/util.h +@@ -102,9 +102,9 @@ extern struct timeval _mysleep; + #ifdef LIBVNCSERVER_HAVE_LIBPTHREAD + extern MUTEX(x11Mutex); + extern MUTEX(scrollMutex); +-MUTEX(clientMutex); +-MUTEX(inputMutex); +-MUTEX(pointerMutex); ++extern MUTEX(clientMutex); ++extern MUTEX(inputMutex); ++extern MUTEX(pointerMutex); + #endif + + #define X_INIT INIT_MUTEX(x11Mutex) +-- +2.24.1 + diff --git a/x11-misc/x11vnc/x11vnc-0.9.16-r3.ebuild b/x11-misc/x11vnc/x11vnc-0.9.16-r3.ebuild index bc16d70cde2..f01cd79f6ba 100644 --- a/x11-misc/x11vnc/x11vnc-0.9.16-r3.ebuild +++ b/x11-misc/x11vnc/x11vnc-0.9.16-r3.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -44,6 +44,7 @@ PATCHES=( "${FILESDIR}"/${P}-crypto.patch # https://github.com/LibVNC/x11vnc/issues/86 "${FILESDIR}"/${P}-anonymous-ssl.patch # https://github.com/LibVNC/x11vnc/pull/85 "${FILESDIR}"/${P}-libressl.patch + "${FILESDIR}"/${P}-fno-common.patch ) src_prepare() {
