Avoid sign extension in 32-bit mmap.

Change-Id: I2a77925f62f381a0b34648c3db8154a55dd80c46
This commit is contained in:
Elliott Hughes 2013-12-20 18:17:34 -08:00
parent 22323f91b1
commit 99868904fe
1 changed files with 1 additions and 1 deletions

View File

@ -55,5 +55,5 @@ void* mmap64(void* addr, size_t size, int prot, int flags, int fd, off64_t offse
}
void* mmap(void* addr, size_t size, int prot, int flags, int fd, off_t offset) {
return mmap64(addr, size, prot, flags, fd, static_cast<off64_t>(offset));
return mmap64(addr, size, prot, flags, fd, static_cast<off64_t>(offset) & 0xffffffff);
}