0ad: fix build for gcc 13

This commit is contained in:
oreo639 2024-02-18 20:59:44 -08:00
parent d198bb8f02
commit f504e955fa
1 changed files with 48 additions and 0 deletions

View File

@ -0,0 +1,48 @@
From 093e1eb23519ab4a4633a999a555a58e4fd5343e Mon Sep 17 00:00:00 2001
From: Stan <Stan@3db68df2-c116-0410-a063-a993310a9797>
Date: Sat, 13 May 2023 12:08:23 +0000
Subject: [PATCH] Fix compilation with GCC 13.
gcc-13 less often includes cstdint so one might need to include it manually if needed.
The headers already included in Message.h are included within namespace AtlasMessage which didn't break by chance, move them out and add cstdint.
Patch by: @sera
Reviewed by: @phosit
Fixes: #6800
Differential Revision: https://code.wildfiregames.com/D4997
git-svn-id: https://svn.wildfiregames.com/public/ps/trunk@27644 3db68df2-c116-0410-a063-a993310a9797
---
source/tools/atlas/GameInterface/Messages.h | 10 ++++++----
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/source/tools/atlas/GameInterface/Messages.h b/source/tools/atlas/GameInterface/Messages.h
index 2fa47809213..a486d93a687 100644
--- a/source/tools/atlas/GameInterface/Messages.h
+++ b/source/tools/atlas/GameInterface/Messages.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2022 Wildfire Games.
+/* Copyright (C) 2023 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@@ -18,13 +18,15 @@
#ifndef INCLUDED_MESSAGES
#define INCLUDED_MESSAGES
+#include <cstdint>
+#include <string>
+#include <vector>
+
+// Opens namespace AtlasMessage, closes it on second inclusion!
#ifndef MESSAGES_SKIP_SETUP
#include "MessagesSetup.h"
#endif
-#include <vector>
-#include <string>
-
// TODO: organisation, documentation, etc
#ifdef _MSC_VER // (can't use MSC_VERSION here since this file is included by Atlas too)