For PR351:
* Ensure #includes are wrapped with appropriate HAVE_ guards
llvm-svn: 19156
diff --git a/llvm/lib/System/Unix/MappedFile.cpp b/llvm/lib/System/Unix/MappedFile.cpp
index 36a17e0..07683c1 100644
--- a/llvm/lib/System/Unix/MappedFile.cpp
+++ b/llvm/lib/System/Unix/MappedFile.cpp
@@ -16,10 +16,20 @@
//=== is guaranteed to work on *all* UNIX variants.
//===----------------------------------------------------------------------===//
-#include "llvm/System/Process.h"
#include "Unix.h"
+#include "llvm/System/Process.h"
+
+#ifdef HAVE_FCNTL_H
#include <fcntl.h>
+#endif
+
+#ifdef HAVE_SYS_MMAN_H
#include <sys/mman.h>
+#endif
+
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
namespace llvm {
using namespace sys;