mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-13 14:47:00 +00:00
Add #ifdef hack for MAP_ANONYMOUS being spelled MAP_ANON on some platforms.
(We're already talking about autoconf'ing this, so I'm assuming this hack will be short-lived...I just don't want it to get lost in my working files.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6761 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c0feeb5a0f
commit
4399a4982a
@ -73,6 +73,9 @@ static void *getMemory(unsigned NumPages) {
|
||||
static const long pageSize = sysconf(_SC_PAGESIZE);
|
||||
|
||||
#if defined(i386) || defined(__i386__) || defined(__x86__)
|
||||
#if defined(MAP_ANON) && !defined(MAP_ANONYMOUS)
|
||||
# define MAP_ANONYMOUS MAP_ANON
|
||||
#endif
|
||||
pa = mmap(0, pageSize*NumPages, PROT_READ|PROT_WRITE|PROT_EXEC,
|
||||
MAP_PRIVATE|MAP_ANONYMOUS, 0, 0); /* fd = 0 */
|
||||
#elif defined(sparc) || defined(__sparc__) || defined(__sparcv9)
|
||||
|
Loading…
Reference in New Issue
Block a user