From 71cf31fcaf723e3710b6c9c69f8128d44a8b61ec Mon Sep 17 00:00:00 2001
From: sphere <spherallic@gmail.com>
Date: Thu, 28 May 2020 18:43:04 +0200
Subject: [PATCH] Fix the "Custom skincolors" branch not compiling with GCC 10.

---
 src/d_main.c  | 5 ++++-
 src/doomdef.h | 2 +-
 src/m_menu.h  | 2 +-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/d_main.c b/src/d_main.c
index 96760c794..2e5519c83 100644
--- a/src/d_main.c
+++ b/src/d_main.c
@@ -125,6 +125,9 @@ boolean advancedemo;
 INT32 debugload = 0;
 #endif
 
+UINT16 numskincolors;
+menucolor_t *menucolorhead, *menucolortail;
+
 char savegamename[256];
 
 char srb2home[256] = ".";
@@ -1190,7 +1193,7 @@ void D_SRB2Main(void)
 
 	if (M_CheckParm("-password") && M_IsNextParm())
 		D_SetPassword(M_GetNextParm());
-	
+
 	// player setup menu colors must be initialized before
 	// any wad file is added, as they may contain colors themselves
 	M_InitPlayerSetupColors();
diff --git a/src/doomdef.h b/src/doomdef.h
index 120df8526..1cb491a10 100644
--- a/src/doomdef.h
+++ b/src/doomdef.h
@@ -396,7 +396,7 @@ typedef enum
 	NUMSUPERCOLORS = ((SKINCOLOR_FIRSTFREESLOT - FIRSTSUPERCOLOR)/5)
 } skincolornum_t;
 
-UINT16 numskincolors;
+extern UINT16 numskincolors;
 
 extern skincolor_t skincolors[MAXSKINCOLORS];
 
diff --git a/src/m_menu.h b/src/m_menu.h
index 240c4b235..cce5a6a6c 100644
--- a/src/m_menu.h
+++ b/src/m_menu.h
@@ -450,7 +450,7 @@ typedef struct menucolor_s {
 	UINT16 color;
 } menucolor_t;
 
-menucolor_t *menucolorhead, *menucolortail;
+extern menucolor_t *menucolorhead, *menucolortail;
 
 void M_AddMenuColor(UINT16 color);
 void M_MoveColorBefore(UINT16 color, UINT16 targ);
-- 
GitLab