Bug 560017 Failed build js/src/jsgcchunk.cpp on Solaris r=jimb

This commit is contained in:
Ginn Chen 2010-04-26 14:17:29 +08:00
Родитель 03bea686c0
Коммит 5c3cbe97a9
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -203,7 +203,7 @@ 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.
*/
void *p = mmap((void *) alignment, size, PROT_READ | PROT_WRITE,
void *p = mmap((caddr_t) alignment, size, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_NOSYNC | MAP_ALIGN | MAP_ANON, -1, 0);
if (p == MAP_FAILED)
return NULL;
@ -236,7 +236,7 @@ MapPages(void *addr, size_t size)
static void
UnmapPages(void *addr, size_t size)
{
JS_ALWAYS_TRUE(munmap(addr, size) == 0);
JS_ALWAYS_TRUE(munmap((caddr_t) addr, size) == 0);
}
#endif
@ -256,7 +256,7 @@ AllocGCChunk()
{
void *p;
#if JS_GC_HAS_MAP_ALIGN
#ifdef JS_GC_HAS_MAP_ALIGN
p = MapAlignedPages(GC_CHUNK_SIZE, GC_CHUNK_SIZE);
if (!p)
return NULL;