mirror of https://github.com/Icinga/icinga2.git
Windows build fix.
This commit is contained in:
parent
1804caf3b8
commit
04fd703e6a
|
@ -75,6 +75,9 @@
|
|||
#include <cassert>
|
||||
#include <cerrno>
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <string>
|
||||
#include <exception>
|
||||
#include <stdexcept>
|
||||
|
|
|
@ -22,8 +22,6 @@
|
|||
|
||||
#include <limits.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
|
|
|
@ -182,8 +182,13 @@ vector<ConfigItem::Ptr> ConfigCompiler::HandleFileInclude(const String& include,
|
|||
BOOST_FOREACH(const String& dir, m_IncludeSearchDirs) {
|
||||
String path = dir + "/" + include;
|
||||
|
||||
#ifndef _WIN32
|
||||
struct stat statbuf;
|
||||
if (lstat(path.CStr(), &statbuf) >= 0) {
|
||||
#else /* _WIN32 */
|
||||
struct _stat statbuf;
|
||||
if (_stat(path.CStr(), &statbuf) >= 0) {
|
||||
#endif /* _WIN32 */
|
||||
includePath = path;
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue