runtime: Add casts to mincore call to compile on Solaris.

Based on patch from Rainer Orth.

From-SVN: r213599
This commit is contained in:
Ian Lance Taylor 2014-08-04 17:54:09 +00:00
parent c1b361560f
commit d79fe5971a

View File

@ -47,7 +47,7 @@ addrspace_free(void *v __attribute__ ((unused)), uintptr n __attribute__ ((unuse
chunk = page_size * sizeof vec;
if(chunk > (n - off))
chunk = n - off;
errval = mincore((int8*)v + off, chunk, vec);
errval = mincore((char*)v + off, chunk, (void*)vec);
// ENOMEM means unmapped, which is what we want.
// Anything else we assume means the pages are mapped.
if(errval == 0 || errno != ENOMEM)