aboutsummaryrefslogtreecommitdiff
path: root/lib/System/Unix/MappedFile.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-10-05 00:46:21 +0000
committerChris Lattner <sabre@nondot.org>2004-10-05 00:46:21 +0000
commit341e1dad1b97854af182b0b5293a02c553e9a033 (patch)
tree57aa8b8b1cb91ecdbb902e568d7a1a891d8e406a /lib/System/Unix/MappedFile.cpp
parente4421b4e257f216f2dcd89256fe5b5335e10096c (diff)
Solaris doesn't have MAP_FILE.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16682 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System/Unix/MappedFile.cpp')
-rw-r--r--lib/System/Unix/MappedFile.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/System/Unix/MappedFile.cpp b/lib/System/Unix/MappedFile.cpp
index d853acec4f..7682c23fda 100644
--- a/lib/System/Unix/MappedFile.cpp
+++ b/lib/System/Unix/MappedFile.cpp
@@ -76,7 +76,10 @@ void MappedFile::unmap() {
void* MappedFile::map() {
if (!isMapped()) {
int prot = PROT_NONE;
- int flags = MAP_FILE;
+ int flags = 0;
+#ifdef MAP_FILE
+ flags |= MAP_FILE;
+#endif
if (options_ == 0) {
prot = PROT_READ;
flags = MAP_PRIVATE;