https://bugs.gentoo.org/898032 https://github.com/symless/synergy-core/commit/ab8a7b5ed44a3aeadc7a20f0e4020d47ac258e14 From ab8a7b5ed44a3aeadc7a20f0e4020d47ac258e14 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Thu, 8 Dec 2022 09:16:44 +0000 Subject: [PATCH] add missing includes for SIZE_MAX (#7237) Without the change the build on upcoming `gcc-13` ails as: src/lib/base/Log.cpp: In member function 'void Log::print(const char*, int, const char*, ...)': src/lib/base/Log.cpp:128:23: error: 'SIZE_MAX' was not declared in this scope 128 | if ((strnlen(fmt, SIZE_MAX) > 2) && (fmt[0] == '%' && fmt[1] == 'z')) { | ^~~~~~~~ src/lib/base/Log.cpp:30:1: note: 'SIZE_MAX' is defined in header ''; did you forget to '#include '? 29 | #include +++ |+#include 30 | gcc-13 cleaned it's header dependencies and that exposes these failures. --- a/src/lib/base/Log.cpp +++ b/src/lib/base/Log.cpp @@ -23,10 +23,11 @@ #include "base/log_outputters.h" #include "common/Version.h" +#include #include #include #include -#include +#include // names of priorities static const char* g_priority[] = { --- a/src/lib/base/String.cpp +++ b/src/lib/base/String.cpp @@ -21,6 +21,7 @@ #include "common/stdvector.h" #include +#include #include #include #include --- a/src/lib/synergy/IKeyState.cpp +++ b/src/lib/synergy/IKeyState.cpp @@ -19,6 +19,7 @@ #include "synergy/IKeyState.h" #include "base/EventQueue.h" +#include #include #include