]> granicus.if.org Git - icinga2/commitdiff
Win32 build fix.
authorGunnar Beutner <gunnar.beutner@netways.de>
Fri, 13 Jul 2012 13:24:19 +0000 (15:24 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Fri, 13 Jul 2012 13:24:19 +0000 (15:24 +0200)
base/application.cpp

index cb57bf857c9437220fb34c4a076fc0d38b03ee4a..60db3d5a5475b0f24b7ab7f380ae11112d2a80d6 100644 (file)
@@ -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();