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/utils | |
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/utils')
-rw-r--r-- | src/utils/mlock.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils/mlock.cpp b/src/utils/mlock.cpp index bc6ddc67e..ce5ae8aed 100644 --- a/src/utils/mlock.cpp +++ b/src/utils/mlock.cpp @@ -31,7 +31,7 @@ bool has_mlock() bool lock_mem(void* ptr, u32bit bytes) { #if defined(BOTAN_TARGET_OS_HAS_POSIX_MLOCK) - return (::mlock(ptr, bytes) == 0); + return (::mlock((char*)ptr, bytes) == 0); #elif defined(BOTAN_TARGET_OS_HAS_WIN32_VIRTUAL_LOCK) return (::VirtualLock(ptr, bytes) != 0); #else @@ -45,7 +45,7 @@ bool lock_mem(void* ptr, u32bit bytes) void unlock_mem(void* ptr, u32bit bytes) { #if defined(BOTAN_TARGET_OS_HAS_POSIX_MLOCK) - ::munlock(ptr, bytes); + ::munlock((char*)ptr, bytes); #elif defined(BOTAN_TARGET_OS_HAS_WIN32_VIRTUAL_LOCK) ::VirtualUnlock(ptr, bytes); #endif |