summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzamat H. Hackimov <azamat.hackimov@gmail.com>2020-06-18 22:34:18 +0300
committerMikle Kolyada <zlogene@gentoo.org>2020-06-19 00:02:48 +0300
commit9aa6947ae348f91a97f301c0f0e76e6955612420 (patch)
treed6a2ef3d6435c8fd9405eda15b9f7c8ec0056ab6 /dev-libs/opensc
parentdev-python/python-slugify: Bump to 4.0.0 (diff)
downloadgentoo-9aa6947ae348f91a97f301c0f0e76e6955612420.tar.gz
gentoo-9aa6947ae348f91a97f301c0f0e76e6955612420.tar.bz2
gentoo-9aa6947ae348f91a97f301c0f0e76e6955612420.zip
dev-libs/opensc: fix compilation with GCC10
Fix compilation with -fno-commons (see https://github.com/OpenSC/OpenSC/pull/1939). Closes: https://bugs.gentoo.org/706912 Package-Manager: Portage-2.3.99, Repoman-2.3.22 Signed-off-by: Azamat H. Hackimov <azamat.hackimov@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/16316 Signed-off-by: Mikle Kolyada <zlogene@gentoo.org>
Diffstat (limited to 'dev-libs/opensc')
-rw-r--r--dev-libs/opensc/files/opensc-0.20.0-gcc10.patch37
-rw-r--r--dev-libs/opensc/opensc-0.20.0.ebuild4
2 files changed, 41 insertions, 0 deletions
diff --git a/dev-libs/opensc/files/opensc-0.20.0-gcc10.patch b/dev-libs/opensc/files/opensc-0.20.0-gcc10.patch
new file mode 100644
index 000000000000..f96a1140872e
--- /dev/null
+++ b/dev-libs/opensc/files/opensc-0.20.0-gcc10.patch
@@ -0,0 +1,37 @@
+From 5450f61681d0c46c587dbe789bf19f1cb573e794 Mon Sep 17 00:00:00 2001
+From: Jakub Jelen <jjelen@redhat.com>
+Date: Mon, 10 Feb 2020 15:09:17 +0100
+Subject: [PATCH] Unbreak build with -fno-common (default in gcc10)
+
+---
+ src/tests/p11test/p11test.c | 3 +++
+ src/tests/p11test/p11test_common.h | 2 +-
+ 2 files changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/src/tests/p11test/p11test.c b/src/tests/p11test/p11test.c
+index feecf6fb42..a16282cba3 100644
+--- a/src/tests/p11test/p11test.c
++++ b/src/tests/p11test/p11test.c
+@@ -34,6 +34,9 @@
+
+ #define DEFAULT_P11LIB "../../pkcs11/.libs/opensc-pkcs11.so"
+
++/* Global variable keeping information about token we are using */
++token_info_t token;
++
+ void display_usage() {
+ fprintf(stdout,
+ " Usage:\n"
+diff --git a/src/tests/p11test/p11test_common.h b/src/tests/p11test/p11test_common.h
+index 2f3b238de0..9eb5cedecb 100644
+--- a/src/tests/p11test/p11test_common.h
++++ b/src/tests/p11test/p11test_common.h
+@@ -84,7 +84,7 @@ typedef struct {
+ size_t num_keygen_mechs;
+ } token_info_t;
+
+-token_info_t token;
++extern token_info_t token;
+
+ #endif /* P11TEST_COMMON_H */
+
diff --git a/dev-libs/opensc/opensc-0.20.0.ebuild b/dev-libs/opensc/opensc-0.20.0.ebuild
index d32490c9e604..fdfd50b8daa8 100644
--- a/dev-libs/opensc/opensc-0.20.0.ebuild
+++ b/dev-libs/opensc/opensc-0.20.0.ebuild
@@ -36,6 +36,10 @@ REQUIRED_USE="
ctapi? ( !pcsc-lite !openct )
|| ( pcsc-lite openct ctapi )"
+PATCHES=(
+ "${FILESDIR}/${P}-gcc10.patch"
+)
+
src_prepare() {
default
elibtoolize