From: Gunnar Beutner Date: Fri, 13 Jul 2012 13:24:19 +0000 (+0200) Subject: Win32 build fix. X-Git-Tag: v0.0.1~247 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7807b87ff50f4ef3badbca0c8621e01a1a59011c;p=icinga2 Win32 build fix. --- diff --git a/base/application.cpp b/base/application.cpp index cb57bf857..60db3d5a5 100644 --- a/base/application.cpp +++ b/base/application.cpp @@ -419,6 +419,7 @@ void Application::UpdatePidFile(const string& filename) if (m_PidFile == NULL) throw runtime_error("Could not open PID file '" + filename + "'"); +#ifndef _WIN32 if (flock(fileno(m_PidFile), LOCK_EX | LOCK_NB) < 0) { ClosePidFile(); @@ -426,6 +427,7 @@ void Application::UpdatePidFile(const string& filename) "already running. Remove the '" + filename + "' file if " "you're certain that this is not the case."); } +#endif #ifndef _WIN32 pid_t pid = getpid();