commit:     fec4effdd2bd2dfce8775be5ee50ef475b593dfc
Author:     Jakov Smolic <jakov.smolic <AT> sartura <DOT> hr>
AuthorDate: Thu Feb  4 19:25:10 2021 +0000
Commit:     Ben Kohler <bkohler <AT> gentoo <DOT> org>
CommitDate: Tue Feb  9 16:59:19 2021 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fec4effd

app-office/magicpoint: Fix build with gcc-10

Closes: https://bugs.gentoo.org/746488
Signed-off-by: Jakov Smolic <jakov.smolic <AT> sartura.hr>
Signed-off-by: Ben Kohler <bkohler <AT> gentoo.org>

 .../files/magicpoint-1.13a_p20121015-fno-common.patch         | 11 +++++++++++
 app-office/magicpoint/magicpoint-1.13a_p20121015-r1.ebuild    |  3 ++-
 2 files changed, 13 insertions(+), 1 deletion(-)

diff --git 
a/app-office/magicpoint/files/magicpoint-1.13a_p20121015-fno-common.patch 
b/app-office/magicpoint/files/magicpoint-1.13a_p20121015-fno-common.patch
new file mode 100644
index 00000000000..1dcf1fb535c
--- /dev/null
+++ b/app-office/magicpoint/files/magicpoint-1.13a_p20121015-fno-common.patch
@@ -0,0 +1,11 @@
+--- a/grammar.y
++++ b/grammar.y
+@@ -73,7 +73,7 @@ static struct qual qerr = { Q_UNDEF, Q_UNDEF, Q_UNDEF, 
Q_UNDEF };
+ int n_errors = 0;
+ struct ctrl *root;
+ char *yyfilename;
+-int yylineno;
++extern int yylineno;
+ 
+ #ifdef HAVE_STDARG_H
+ /* GCC complains if we declare this function in traditional style */

diff --git a/app-office/magicpoint/magicpoint-1.13a_p20121015-r1.ebuild 
b/app-office/magicpoint/magicpoint-1.13a_p20121015-r1.ebuild
index 5e341810c2f..c72a1f5b574 100644
--- a/app-office/magicpoint/magicpoint-1.13a_p20121015-r1.ebuild
+++ b/app-office/magicpoint/magicpoint-1.13a_p20121015-r1.ebuild
@@ -60,7 +60,8 @@ src_prepare() {
                "${FILESDIR}"/${PN}-1.13a_p20121015-parse-empty.patch \
                "${FILESDIR}"/${PN}-1.13a_p20121015-draw-charset.patch \
                "${FILESDIR}"/${PN}-1.13a_p20121015-draw-stringtoolong.patch \
-               "${FILESDIR}"/${PN}-1.13a_p20121015-implicit-declaration.patch
+               "${FILESDIR}"/${PN}-1.13a_p20121015-implicit-declaration.patch \
+               "${FILESDIR}"/${PN}-1.13a_p20121015-fno-common.patch
 
        if ! use imlib; then
                epatch "${FILESDIR}"/${PN}-1.13a-libpng15.patch

Reply via email to