Solaris doesn't have MAP_FILE.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16682 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2004-10-05 00:46:21 +00:00
parent e4421b4e25
commit 341e1dad1b
2 changed files with 8 additions and 2 deletions

View File

@ -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;

View File

@ -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;