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.5.0~725 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=af441191f3caa54cd4cf677f0d26465f4564745b;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;