games-arcade/nibbles: tweak for gcc-10, bug #706446

Reported-by: Toralf Förster
Closes: https://bugs.gentoo.org/706446
Package-Manager: Portage-2.3.85, Repoman-2.3.20
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
This commit is contained in:
Sergei Trofimovich
2020-01-26 15:17:01 +00:00
parent 8cbac4669c
commit d32a3e020d
2 changed files with 24 additions and 1 deletions

View File

@@ -0,0 +1,22 @@
--- a/scoring.c
+++ b/scoring.c
@@ -12,6 +12,8 @@
#include <time.h>
#include "scoring.h"
+char highscoref[255];
+
int get_high_scores(struct highscoreent *highscores[], int *numscores)
{
FILE *scorefile;
--- a/scoring.h
+++ b/scoring.h
@@ -11,7 +11,7 @@
/* Max number of high scores we store */
#define MAXHIGHSCORES 20
-char highscoref[255];
+extern char highscoref[255];
struct highscoreent {
char name[16];

View File

@@ -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
@@ -24,6 +24,7 @@ GAMES_STATEDIR="/var/games/${PN}"
PATCHES=(
"${FILESDIR}"/${P}-as-needed.patch
"${FILESDIR}"/${P}-gcc-10.patch
)
S="${WORKDIR}/${MY_P}"