runtime: Add casts to mincore call to compile on Solaris.
authorIan Lance Taylor <ian@gcc.gnu.org>
Mon, 4 Aug 2014 17:54:09 +0000 (17:54 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Mon, 4 Aug 2014 17:54:09 +0000 (17:54 +0000)
Based on patch from Rainer Orth.

From-SVN: r213599

libgo/runtime/mem.c

index 8e374863b8e4509efc7d5f3d79e0efec2c020774..6312480b69d074e0627dde06f6767590783aa764 100644 (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)