otautil: Fix mac build.
bootable/recovery/otautil/SysUtil.cpp:103:19: error: use of undeclared identifier 'mmap64'; did you mean 'mmap'? void* reserve = mmap64(nullptr, blocks * blksize, PROT_NONE, MAP_PRIVATE | MAP_ANON, -1, 0); ^~~~~~ Test: mmma bootable/recovery Change-Id: I22d7dc4d994069201e5a633cec21421e2c4182fa
This commit is contained in:
parent
abade5af15
commit
c13d2ec772
2 changed files with 4 additions and 3 deletions
|
@ -29,6 +29,7 @@ cc_library_static {
|
|||
],
|
||||
|
||||
cflags: [
|
||||
"-D_FILE_OFFSET_BITS=64",
|
||||
"-Werror",
|
||||
"-Wall",
|
||||
],
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue