mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 568782 add #ifdef SOLARIS for mmap/munmap changes r=igor
This commit is contained in:
parent
dd44050eb2
commit
7a935c4faf
@ -164,7 +164,11 @@ StackSpace::finish()
|
||||
#elif defined(XP_OS2)
|
||||
DosFreeMem(base);
|
||||
#else
|
||||
#ifdef SOLARIS
|
||||
munmap((caddr_t)base, CAPACITY_BYTES);
|
||||
#else
|
||||
munmap(base, CAPACITY_BYTES);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -202,8 +202,13 @@ MapAlignedPages(size_t size, size_t alignment)
|
||||
* We don't use MAP_FIXED here, because it can cause the *replacement*
|
||||
* of existing mappings, and we only want to create new mappings.
|
||||
*/
|
||||
#ifdef SOLARIS
|
||||
void *p = mmap((caddr_t) alignment, size, PROT_READ | PROT_WRITE,
|
||||
MAP_PRIVATE | MAP_NOSYNC | MAP_ALIGN | MAP_ANON, -1, 0);
|
||||
#else
|
||||
void *p = mmap((void *) alignment, size, PROT_READ | PROT_WRITE,
|
||||
MAP_PRIVATE | MAP_NOSYNC | MAP_ALIGN | MAP_ANON, -1, 0);
|
||||
#endif
|
||||
if (p == MAP_FAILED)
|
||||
return NULL;
|
||||
return p;
|
||||
@ -235,7 +240,11 @@ MapPages(void *addr, size_t size)
|
||||
static void
|
||||
UnmapPages(void *addr, size_t size)
|
||||
{
|
||||
#ifdef SOLARIS
|
||||
JS_ALWAYS_TRUE(munmap((caddr_t) addr, size) == 0);
|
||||
#else
|
||||
JS_ALWAYS_TRUE(munmap(addr, size) == 0);
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user