Fix crash in Process::IOThreadProc when building Icinga 2 with GCC 4.7.2

fixes #10648
This commit is contained in:
Gunnar Beutner 2015-11-17 22:04:50 +01:00
parent ac7f4fada8
commit b75aa74cbd
1 changed files with 2 additions and 2 deletions

View File

@ -199,8 +199,8 @@ void Process::IOThreadProc(int tid)
#endif /* _WIN32 */
int i = 1;
std::pair<ProcessHandle, Process::Ptr> kv;
BOOST_FOREACH(kv, l_Processes[tid]) {
typedef std::pair<ProcessHandle, Process::Ptr> kv_pair;
BOOST_FOREACH(const kv_pair& kv, l_Processes[tid]) {
const Process::Ptr& process = kv.second;
#ifdef _WIN32
handles[i] = kv.first;