aboutsummaryrefslogtreecommitdiffstats
path: root/src/alloc/alloc_mmap
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-09-07 13:05:01 +0000
committerlloyd <[email protected]>2010-09-07 13:05:01 +0000
commitad3427826a6dc2113142f1fbee158d79cd3e046d (patch)
tree4c39050119a164eb6396a3d05e52fdedc3dc5171 /src/alloc/alloc_mmap
parent6948821a25bcca3efea8eb2c32d5a0cb9d627efe (diff)
Cast the first argument to msync, munmap, mlock, and munlock to char*
to fix compilation on Solaris. Everybody else, including POSIX.1, uses void* here, but as usual Solaris likes to be special.
Diffstat (limited to 'src/alloc/alloc_mmap')
-rw-r--r--src/alloc/alloc_mmap/mmap_mem.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/alloc/alloc_mmap/mmap_mem.cpp b/src/alloc/alloc_mmap/mmap_mem.cpp
index a2059a6ea..2b27b2908 100644
--- a/src/alloc/alloc_mmap/mmap_mem.cpp
+++ b/src/alloc/alloc_mmap/mmap_mem.cpp
@@ -120,11 +120,11 @@ void MemoryMapping_Allocator::dealloc_block(void* ptr, u32bit n)
{
std::memset(ptr, PATTERNS[j], n);
- if(::msync(ptr, n, MS_SYNC))
+ if(::msync((char*)ptr, n, MS_SYNC))
throw MemoryMapping_Failed("Sync operation failed");
}
- if(::munmap(ptr, n))
+ if(::munmap((char*)ptr, n))
throw MemoryMapping_Failed("Could not unmap file");
}