Build fix for Visual Studio 2013

fixes #12099
This commit is contained in:
Gunnar Beutner 2016-07-05 13:49:49 +02:00
parent 349ef5ac2c
commit 63f83e8bec
1 changed files with 4 additions and 2 deletions

View File

@ -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));
}
}