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