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

index 60db3d5a5475b0f24b7ab7f380ae11112d2a80d6..2d5d1b53f5cf1494b8c17d30b5cadf8fbf0ed600 100644 (file)
@@ -427,7 +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
+#endif /* _WIN32 */
 
 #ifndef _WIN32
        pid_t pid = getpid();
index a6b97bdcad842c4f9ac57f1f564f0dfa79b22bd8..3ca027a84d2b1c1e72ffc90f7a4fa26145299e80 100644 (file)
@@ -251,7 +251,11 @@ void IcingaApplication::NewLogHandler(const ConfigObject::Ptr& object)
                severity = Logger::StringToSeverity(strSeverity);
 
        if (type == "syslog") {
+#ifndef _WIN32
                logger = boost::make_shared<SyslogLogger>(severity);
+#else /* _WIN32 */
+               throw invalid_argument("Syslog is not supported on Windows.");
+#endif /* _WIN32 */
        } else if (type == "file") {
                string path;
                if (!object->GetProperty("path", &path))