From: Gunnar Beutner Date: Tue, 17 Nov 2015 21:04:50 +0000 (+0100) Subject: Fix crash in Process::IOThreadProc when building Icinga 2 with GCC 4.7.2 X-Git-Tag: v2.4.1~31 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b75aa74cbdc86f0a41c1f05938f25f414df06a7c;p=icinga2 Fix crash in Process::IOThreadProc when building Icinga 2 with GCC 4.7.2 fixes #10648 --- diff --git a/lib/base/process.cpp b/lib/base/process.cpp index 089e41dae..37ca62935 100644 --- a/lib/base/process.cpp +++ b/lib/base/process.cpp @@ -199,8 +199,8 @@ void Process::IOThreadProc(int tid) #endif /* _WIN32 */ int i = 1; - std::pair kv; - BOOST_FOREACH(kv, l_Processes[tid]) { + typedef std::pair kv_pair; + BOOST_FOREACH(const kv_pair& kv, l_Processes[tid]) { const Process::Ptr& process = kv.second; #ifdef _WIN32 handles[i] = kv.first;