Commit cd33b08f by Ian Lance Taylor

runtime: Add type casts to fix Solaris build.

From Rainer Orth.

From-SVN: r184823
parent 9c23e8b8
...@@ -44,13 +44,13 @@ mmap_fixed(byte *v, uintptr n, int32 prot, int32 flags, int32 fd, uint32 offset) ...@@ -44,13 +44,13 @@ mmap_fixed(byte *v, uintptr n, int32 prot, int32 flags, int32 fd, uint32 offset)
{ {
void *p; void *p;
p = runtime_mmap(v, n, prot, flags, fd, offset); p = runtime_mmap((void *)v, n, prot, flags, fd, offset);
if(p != v && addrspace_free(v, n)) { if(p != v && addrspace_free(v, n)) {
// On some systems, mmap ignores v without // On some systems, mmap ignores v without
// MAP_FIXED, so retry if the address space is free. // MAP_FIXED, so retry if the address space is free.
if(p != MAP_FAILED) if(p != MAP_FAILED)
runtime_munmap(p, n); runtime_munmap(p, n);
p = runtime_mmap(v, n, prot, flags|MAP_FIXED, fd, offset); p = runtime_mmap((void *)v, n, prot, flags|MAP_FIXED, fd, offset);
} }
return p; return p;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment