Windows build fix.

This commit is contained in:
Gunnar Beutner 2013-02-01 23:10:48 +01:00
parent 1804caf3b8
commit 04fd703e6a
3 changed files with 8 additions and 2 deletions

View File

@ -75,6 +75,9 @@
#include <cassert>
#include <cerrno>
#include <sys/types.h>
#include <sys/stat.h>
#include <string>
#include <exception>
#include <stdexcept>

View File

@ -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>

View File

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