From b75aa74cbdc86f0a41c1f05938f25f414df06a7c Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Tue, 17 Nov 2015 22:04:50 +0100 Subject: [PATCH] Fix crash in Process::IOThreadProc when building Icinga 2 with GCC 4.7.2 fixes #10648 --- lib/base/process.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.40.0