From 63f83e8bec76fe0f497f84cf79fad6c6d9779581 Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Tue, 5 Jul 2016 13:49:49 +0200 Subject: [PATCH] Build fix for Visual Studio 2013 fixes #12099 --- icinga-installer/icinga-installer.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/icinga-installer/icinga-installer.cpp b/icinga-installer/icinga-installer.cpp index 3653b935a..5fb10512e 100644 --- a/icinga-installer/icinga-installer.cpp +++ b/icinga-installer/icinga-installer.cpp @@ -25,6 +25,8 @@ #include #include #include +#include +#include static std::string GetIcingaInstallPath(void) { @@ -124,8 +126,8 @@ static void MkDirP(const std::string& path) pos = path.find_first_of("/\\", pos + 1); std::string spath = path.substr(0, pos + 1); - struct stat statbuf; - if (stat(spath.c_str(), &statbuf) < 0 && errno == ENOENT) + struct _stat statbuf; + if (_stat(spath.c_str(), &statbuf) < 0 && errno == ENOENT) MkDir(path.substr(0, pos)); } }