diff options
author | lloyd <[email protected]> | 2010-09-07 13:05:01 +0000 |
---|---|---|
committer | lloyd <[email protected]> | 2010-09-07 13:05:01 +0000 |
commit | ad3427826a6dc2113142f1fbee158d79cd3e046d (patch) | |
tree | 4c39050119a164eb6396a3d05e52fdedc3dc5171 /src/alloc/alloc_mmap | |
parent | 6948821a25bcca3efea8eb2c32d5a0cb9d627efe (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.cpp | 4 |
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"); } |