1 Solaris madvise() first parameter is caddr_t; Linux, BSDs, etc. is void*.
2 The cast is safe as void and unsigned char have same alignment.
6 diff --git a/Source/bmalloc/bmalloc/VMAllocate.h b/Source/bmalloc/bmalloc/VMAllocate.h
7 index 580251e..a3e3be3 100644
8 --- a/Source/bmalloc/bmalloc/VMAllocate.h
9 +++ b/Source/bmalloc/bmalloc/VMAllocate.h
10 @@ -204,7 +204,7 @@ inline void vmDeallocatePhysicalPages(void* p, size_t vmSize)
12 SYSCALL(madvise(p, vmSize, MADV_FREE));
14 - SYSCALL(madvise(p, vmSize, MADV_DONTNEED));
15 + SYSCALL(madvise(reinterpret_cast<char*>(p), vmSize, MADV_DONTNEED));
17 SYSCALL(madvise(p, vmSize, MADV_DONTDUMP));
19 @@ -217,7 +217,7 @@ inline void vmAllocatePhysicalPages(void* p, size_t vmSize)
21 SYSCALL(madvise(p, vmSize, MADV_FREE_REUSE));
23 - SYSCALL(madvise(p, vmSize, MADV_NORMAL));
24 + SYSCALL(madvise(reinterpret_cast<char*>(p), vmSize, MADV_NORMAL));
26 SYSCALL(madvise(p, vmSize, MADV_DODUMP));