[icinga-checkins] icinga.org: icinga2/master: Build fix for Visual Studio 2013

git at icinga.org git at icinga.org
Tue Jul 5 13:50:10 CEST 2016


Module: icinga2
Branch: master
Commit: 63f83e8bec76fe0f497f84cf79fad6c6d9779581
URL:    https://git.icinga.org/?p=icinga2.git;a=commit;h=63f83e8bec76fe0f497f84cf79fad6c6d9779581

Author: Gunnar Beutner <gunnar.beutner at netways.de>
Date:   Tue Jul  5 13:49:49 2016 +0200

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 3653b93..5fb1051 100644
--- a/icinga-installer/icinga-installer.cpp
+++ b/icinga-installer/icinga-installer.cpp
@@ -25,6 +25,8 @@
 #include <shlwapi.h>
 #include <shellapi.h>
 #include <shlobj.h>
+#include <sys/types.h>
+#include <sys/stat.h>
 
 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));
 	}
 }



More information about the icinga-checkins mailing list