aboutsummaryrefslogtreecommitdiff
path: root/lib/System/Unix/MappedFile.inc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/System/Unix/MappedFile.inc')
-rw-r--r--lib/System/Unix/MappedFile.inc12
1 files changed, 11 insertions, 1 deletions
diff --git a/lib/System/Unix/MappedFile.inc b/lib/System/Unix/MappedFile.inc
index 36a17e0f2c..07683c1439 100644
--- a/lib/System/Unix/MappedFile.inc
+++ b/lib/System/Unix/MappedFile.inc
@@ -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;