From 330c3710e34018145a577e0063dacb0f7cbf2e0d Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Fri, 13 Jul 2012 15:29:39 +0200 Subject: [PATCH] More Win32 build fixes. --- base/application.cpp | 2 +- icinga/icingaapplication.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/base/application.cpp b/base/application.cpp index 60db3d5a5..2d5d1b53f 100644 --- a/base/application.cpp +++ b/base/application.cpp @@ -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(); diff --git a/icinga/icingaapplication.cpp b/icinga/icingaapplication.cpp index a6b97bdca..3ca027a84 100644 --- a/icinga/icingaapplication.cpp +++ b/icinga/icingaapplication.cpp @@ -251,7 +251,11 @@ void IcingaApplication::NewLogHandler(const ConfigObject::Ptr& object) severity = Logger::StringToSeverity(strSeverity); if (type == "syslog") { +#ifndef _WIN32 logger = boost::make_shared(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)) -- 2.40.0