Fix -fno-common issues, taken from AUR.

ok tb@
This commit is contained in:
bcallah 2021-03-05 01:21:01 +00:00
parent 2c50e98855
commit 9fa7c0ca72
2 changed files with 28 additions and 1 deletions

View File

@ -1,7 +1,8 @@
# $OpenBSD: Makefile,v 1.12 2019/07/12 20:46:21 sthen Exp $
# $OpenBSD: Makefile,v 1.13 2021/03/05 01:21:01 bcallah Exp $
COMMENT= game like Deflektor (C64) / Mindbender (Amiga)
DISTNAME= mirrormagic-3.0.0
REVISION= 0
CATEGORIES= games x11
HOMEPAGE= https://www.artsoft.org/mirrormagic/

View File

@ -0,0 +1,26 @@
$OpenBSD: patch-src_main_c,v 1.1 2021/03/05 01:21:01 bcallah Exp $
Fixes for -fno-common
From AUR: https://aur.archlinux.org/cgit/aur.git/tree/mirrormagic-3.0.0-variables-scope.patch?h=mirrormagic
Index: src/main.c
--- src/main.c.orig
+++ src/main.c
@@ -69,7 +69,7 @@ short ExplodeDelay[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
int RunnerVisit[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
int PlayerVisit[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
-int GfxFrame[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
+extern int GfxFrame[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
int GfxRandom[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
int GfxElement[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
int GfxAction[MAX_LEV_FIELDX][MAX_LEV_FIELDY];
@@ -138,7 +138,7 @@ struct LevelInfo level, level_template;
struct PlayerInfo stored_player[MAX_PLAYERS], *local_player = NULL;
struct HiScore highscore[MAX_SCORE_ENTRIES];
struct TapeInfo tape;
-struct SetupInfo setup;
+extern struct SetupInfo setup;
struct GameInfo game;
struct GlobalInfo global;
struct BorderInfo border;