diff --git a/lib/ExecutionEngine/JIT/Intercept.cpp b/lib/ExecutionEngine/JIT/Intercept.cpp index c39263a2d68..3c30dbb1790 100644 --- a/lib/ExecutionEngine/JIT/Intercept.cpp +++ b/lib/ExecutionEngine/JIT/Intercept.cpp @@ -17,6 +17,7 @@ #include "JIT.h" #include "llvm/System/DynamicLibrary.h" +#include "llvm/Config/config.h" #include using namespace llvm; @@ -47,7 +48,9 @@ static void runAtExitHandlers() { // that the dynamic linker can't see. For more info, search for // 'libc_nonshared.a' on Google, or read http://llvm.cs.uiuc.edu/PR274. #if defined(__linux__) +#if defined(HAVE_SYS_STAT_H) #include +#endif void *FunctionPointers[] = { (void *) stat, (void *) fstat,