summaryrefslogtreecommitdiff
path: root/absl/base/internal/direct_mmap.h
diff options
context:
space:
mode:
Diffstat (limited to 'absl/base/internal/direct_mmap.h')
-rw-r--r--absl/base/internal/direct_mmap.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/absl/base/internal/direct_mmap.h b/absl/base/internal/direct_mmap.h
index 815b8d23..e492bb00 100644
--- a/absl/base/internal/direct_mmap.h
+++ b/absl/base/internal/direct_mmap.h
@@ -97,8 +97,7 @@ inline void* DirectMmap(void* start, size_t length, int prot, int flags, int fd,
#ifdef __BIONIC__
// SYS_mmap2 has problems on Android API level <= 16.
// Workaround by invoking __mmap2() instead.
- return __mmap2(start, length, prot, flags, fd,
- static_cast<size_t>(offset / pagesize));
+ return __mmap2(start, length, prot, flags, fd, offset / pagesize);
#else
return reinterpret_cast<void*>(
syscall(SYS_mmap2, start, length, prot, flags, fd,