From c342330127dd2e33c59a699bd8865e54221d7e1c Mon Sep 17 00:00:00 2001 From: Piotr Kubaj Date: Sat, 4 Jan 2020 20:24:19 +0000 Subject: [PATCH] MFH: r522057 games/glest: fix build on GCC architectures Building with GCC fails: ./mk/linux/glest_game/ai/ai_rule.cpp: In member function 'virtual bool Glest::Game::AiRuleMassiveAttack::test()': ./mk/linux/glest_game/ai/ai_rule.cpp:156:46: error: 'INT_MAX' was not declared in this scope 156 | return ai->beingAttacked(attackPos, field, INT_MAX); | ^~~~~~~ ./mk/linux/glest_game/ai/ai_rule.cpp:19:1: note: 'INT_MAX' is defined in header ''; did you forget to '#include '? 18 | #include "leak_dumper.h" +++ |+#include 19 | ./mk/linux/glest_game/ai/ai_rule.cpp: In member function 'virtual bool Glest::Game::AiRuleExpand::test()': ./mk/linux/glest_game/ai/ai_rule.cpp:815:22: error: 'INT_MAX' was not declared in this scope 815 | int minDistance= INT_MAX; | ^~~~~~~ ./mk/linux/glest_game/ai/ai_rule.cpp:815:22: note: 'INT_MAX' is defined in header ''; did you forget to '#include '? ...failed C++ ./build/powerpc64-portbld-freebsd12.1/optimize/glest_game/ai/ai_rule.o ... Include climits in ai_rule.cpp to fix it. PR: 242766 Approved by: mmokhi (maintainer timeout) Approved by: portmgr (fix build blanket) --- .../files/patch-source_glest__game_ai_ai__rule.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 games/glest/files/patch-source_glest__game_ai_ai__rule.cpp diff --git a/games/glest/files/patch-source_glest__game_ai_ai__rule.cpp b/games/glest/files/patch-source_glest__game_ai_ai__rule.cpp new file mode 100644 index 000000000000..19f03554d742 --- /dev/null +++ b/games/glest/files/patch-source_glest__game_ai_ai__rule.cpp @@ -0,0 +1,10 @@ +--- source/glest_game/ai/ai_rule.cpp.orig 2019-12-21 13:33:29 UTC ++++ source/glest_game/ai/ai_rule.cpp +@@ -16,6 +16,7 @@ + #include "ai_interface.h" + #include "unit.h" + #include "leak_dumper.h" ++#include + + using Shared::Graphics::Vec2i; +