From: Douglas Gregor Date: Tue, 22 Jan 2013 23:49:45 +0000 (+0000) Subject: Fix compilation on Linux, which defines PATH_MAX in a weird place, X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3cc6277a3dd4986af6422e41db18ba6efddbd800;p=clang Fix compilation on Linux, which defines PATH_MAX in a weird place, from Saleem Abdulrasool! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173208 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Lex/HeaderSearch.cpp b/lib/Lex/HeaderSearch.cpp index 4982ce4ac0..14d44cc3da 100644 --- a/lib/Lex/HeaderSearch.cpp +++ b/lib/Lex/HeaderSearch.cpp @@ -23,6 +23,11 @@ #include "llvm/Support/FileSystem.h" #include "llvm/Support/Path.h" #include +#if defined(LLVM_ON_UNIX) +#if defined(__linux__) +#include +#endif +#endif using namespace clang; const IdentifierInfo * diff --git a/lib/Lex/ModuleMap.cpp b/lib/Lex/ModuleMap.cpp index 72e79511ee..25e5bee9ce 100644 --- a/lib/Lex/ModuleMap.cpp +++ b/lib/Lex/ModuleMap.cpp @@ -28,6 +28,11 @@ #include "llvm/Support/PathV2.h" #include "llvm/Support/raw_ostream.h" #include +#if defined(LLVM_ON_UNIX) +#if defined(__linux__) +#include +#endif +#endif using namespace clang; Module::ExportDecl