Add fixes for -fno-common

From upstream:
b72b70a423.diff
ok cwen@
This commit is contained in:
bcallah 2021-02-05 22:58:10 +00:00
parent 2905953696
commit 084eb99ce3
5 changed files with 72 additions and 1 deletions

View File

@ -1,8 +1,9 @@
# $OpenBSD: Makefile,v 1.5 2019/09/14 19:13:16 bcallah Exp $
# $OpenBSD: Makefile,v 1.6 2021/02/05 22:58:10 bcallah Exp $
V = 1.61
COMMENT = game of cute bunnies jumping on each other's heads
DISTNAME = jumpnbump-${V}
REVISION = 0
CATEGORIES = games x11
HOMEPAGE = https://gitlab.com/LibreGames/jumpnbump

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-globals_pre,v 1.1 2021/02/05 22:58:10 bcallah Exp $
Fix for -fno-common
https://gitlab.com/LibreGames/jumpnbump/-/commit/b72b70a4233776bdaa6a683c89af2becefd53bd6.diff
Index: globals.pre
--- globals.pre.orig
+++ globals.pre
@@ -267,7 +267,7 @@ extern gob_t number_gobs;
/* main.c */
-int endscore_reached;
+extern int endscore_reached;
void steer_players(void);
void position_player(int player_num);

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-main_c,v 1.1 2021/02/05 22:58:10 bcallah Exp $
Fix for -fno-common
https://gitlab.com/LibreGames/jumpnbump/-/commit/b72b70a4233776bdaa6a683c89af2becefd53bd6.diff
Index: main.c
--- main.c.orig
+++ main.c
@@ -67,6 +67,8 @@ char cur_pal[768];
int ai[JNB_MAX_PLAYERS];
+int endscore_reached = 0;
+
unsigned int ban_map[17][22] = {
{1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
{1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0},

View File

@ -0,0 +1,19 @@
$OpenBSD: patch-network_c,v 1.1 2021/02/05 22:58:10 bcallah Exp $
Fix for -fno-common
https://gitlab.com/LibreGames/jumpnbump/-/commit/b72b70a4233776bdaa6a683c89af2becefd53bd6.diff
Index: network.c
--- network.c.orig
+++ network.c
@@ -32,6 +32,10 @@ int is_server = 1;
int is_net = 0;
int server_said_bye = 0;
+#ifdef USE_NET
+NetInfo net_info[JNB_MAX_PLAYERS];
+#endif
+
void processMovePacket(NetPacket *pkt)
{
int playerid = pkt->arg;

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-network_h,v 1.1 2021/02/05 22:58:10 bcallah Exp $
Fix for -fno-common
https://gitlab.com/LibreGames/jumpnbump/-/commit/b72b70a4233776bdaa6a683c89af2becefd53bd6.diff
Index: network.h
--- network.h.orig
+++ network.h
@@ -74,7 +74,7 @@ typedef struct
SDLNet_SocketSet socketset;
} NetInfo;
-NetInfo net_info[JNB_MAX_PLAYERS];
+extern NetInfo net_info[JNB_MAX_PLAYERS];
void bufToPacket(const char *buf, NetPacket *pkt);