mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-07-18 12:29:27 +00:00
add some #includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@49036 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
98b7e612b2
commit
14c762d82f
@ -24,6 +24,12 @@
|
|||||||
#if HAVE_FCNTL_H
|
#if HAVE_FCNTL_H
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef HAVE_SYS_MMAN_H
|
||||||
|
#include <sys/mman.h>
|
||||||
|
#endif
|
||||||
|
#ifdef HAVE_SYS_STAT_H
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#endif
|
||||||
#if HAVE_UTIME_H
|
#if HAVE_UTIME_H
|
||||||
#include <utime.h>
|
#include <utime.h>
|
||||||
#endif
|
#endif
|
||||||
@ -753,11 +759,11 @@ const char *Path::MapInFilePages(int FD, uint64_t FileSize) {
|
|||||||
void *BasePtr = ::mmap(0, FileSize, PROT_READ, Flags, FD, 0);
|
void *BasePtr = ::mmap(0, FileSize, PROT_READ, Flags, FD, 0);
|
||||||
if (BasePtr == MAP_FAILED)
|
if (BasePtr == MAP_FAILED)
|
||||||
return 0;
|
return 0;
|
||||||
return BasePtr;
|
return (const char*)BasePtr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Path::UnMapFilePages(const char *BasePtr, uint64_t FileSize) {
|
void Path::UnMapFilePages(const char *BasePtr, uint64_t FileSize) {
|
||||||
::munmap(BasePtr, FileSize);
|
::munmap((void*)BasePtr, FileSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // end llvm namespace
|
} // end llvm namespace
|
||||||
|
Loading…
Reference in New Issue
Block a user