bhyve-fw: drop CSM
[oi-userland.git] / components / library / webkitgtk / patches / 01-solaris-madvise.patch
blobfdbf88f14f16b1d3721148c56b80a4b16a2ef05f
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.
4 file upstream bug
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)
11 #elif BOS(FREEBSD)
12 SYSCALL(madvise(p, vmSize, MADV_FREE));
13 #else
14 - SYSCALL(madvise(p, vmSize, MADV_DONTNEED));
15 + SYSCALL(madvise(reinterpret_cast<char*>(p), vmSize, MADV_DONTNEED));
16 #if BOS(LINUX)
17 SYSCALL(madvise(p, vmSize, MADV_DONTDUMP));
18 #endif
19 @@ -217,7 +217,7 @@ inline void vmAllocatePhysicalPages(void* p, size_t vmSize)
20 #if BOS(DARWIN)
21 SYSCALL(madvise(p, vmSize, MADV_FREE_REUSE));
22 #else
23 - SYSCALL(madvise(p, vmSize, MADV_NORMAL));
24 + SYSCALL(madvise(reinterpret_cast<char*>(p), vmSize, MADV_NORMAL));
25 #if BOS(LINUX)
26 SYSCALL(madvise(p, vmSize, MADV_DODUMP));
27 #endif