Skip to content

Commit

Permalink
Build fix for Visual Studio 2013
Browse files Browse the repository at this point in the history
fixes #12099
  • Loading branch information
gunnarbeutner committed Jul 5, 2016
1 parent 349ef5a commit 63f83e8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions icinga-installer/icinga-installer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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));
}
}
Expand Down

0 comments on commit 63f83e8

Please sign in to comment.