summaryrefslogtreecommitdiffstats
path: root/otautil/SysUtil.cpp
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2017-10-10 19:56:09 +0200
committerTao Bao <tbao@google.com>2017-10-10 19:56:09 +0200
commitc13d2ec7726bae1a6ec0d29c4b4ed54ac46149a1 (patch)
tree69d22a6955b57d7301f1f7b67ddd258c7ce00c35 /otautil/SysUtil.cpp
parentMerge changes from topic "libedify-header" (diff)
downloadandroid_bootable_recovery-c13d2ec7726bae1a6ec0d29c4b4ed54ac46149a1.tar
android_bootable_recovery-c13d2ec7726bae1a6ec0d29c4b4ed54ac46149a1.tar.gz
android_bootable_recovery-c13d2ec7726bae1a6ec0d29c4b4ed54ac46149a1.tar.bz2
android_bootable_recovery-c13d2ec7726bae1a6ec0d29c4b4ed54ac46149a1.tar.lz
android_bootable_recovery-c13d2ec7726bae1a6ec0d29c4b4ed54ac46149a1.tar.xz
android_bootable_recovery-c13d2ec7726bae1a6ec0d29c4b4ed54ac46149a1.tar.zst
android_bootable_recovery-c13d2ec7726bae1a6ec0d29c4b4ed54ac46149a1.zip
Diffstat (limited to '')
-rw-r--r--otautil/SysUtil.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/otautil/SysUtil.cpp b/otautil/SysUtil.cpp
index d54a824d2..0655c4778 100644
--- a/otautil/SysUtil.cpp
+++ b/otautil/SysUtil.cpp
@@ -100,7 +100,7 @@ bool MemMapping::MapBlockFile(const std::string& filename) {
}
// Reserve enough contiguous address space for the whole file.
- void* reserve = mmap64(nullptr, blocks * blksize, PROT_NONE, MAP_PRIVATE | MAP_ANON, -1, 0);
+ void* reserve = mmap(nullptr, blocks * blksize, PROT_NONE, MAP_PRIVATE | MAP_ANON, -1, 0);
if (reserve == MAP_FAILED) {
PLOG(ERROR) << "failed to reserve address space";
return false;
@@ -135,8 +135,8 @@ bool MemMapping::MapBlockFile(const std::string& filename) {
break;
}
- void* range_start = mmap64(next, range_size, PROT_READ, MAP_PRIVATE | MAP_FIXED, fd,
- static_cast<off64_t>(start) * blksize);
+ void* range_start = mmap(next, range_size, PROT_READ, MAP_PRIVATE | MAP_FIXED, fd,
+ static_cast<off_t>(start) * blksize);
if (range_start == MAP_FAILED) {
PLOG(ERROR) << "failed to map range " << i << ": " << line;
success = false;