gentoo-ebuilds/games-board/gnushogi/files/gnushogi-1.4.1-xshogi-parser.patch
NHOrus b254a02218
games-board/gnushogi: update EAPI 7 -> 8, fix build errors
Massages Makefile.in into fail-early form, fixes generated parser
by adding missing function declarations.

Closes: https://bugs.gentoo.org/932280
Closes: https://bugs.gentoo.org/930372
Closes: https://bugs.gentoo.org/883893
Signed-off-by: NHOrus <jy6x2b32pie9@yahoo.com>
Closes: https://github.com/gentoo/gentoo/pull/40586
Signed-off-by: Sam James <sam@gentoo.org>
2025-02-15 20:55:29 +00:00

25 lines
711 B
Diff

Fix compilation with modern C: add correct function declarations
https://bugs.gentoo.org/883893
https://bugs.gentoo.org/930372
https://bugs.gentoo.org/932280
--- a/xshogi/parser.y
+++ b/xshogi/parser.y
@@ -70,7 +70,9 @@
enum { False, True };
-static void yyerror();
+static void yyerror(char *);
+extern int yyparse (void);
+extern int yylex (void);
static ShogiMove move_type;
static int from_x, from_y, to_x, to_y;
@@ -88,6 +90,7 @@
extern void SendToProgram(char *message, FILE *fp);
extern void MakeMove(ShogiMove *move_type, int from_x, int from_y,
int to_x, int to_y);
+extern void DisplayMessage(char *message, int toRemotePlayer);
%}