diff options
Diffstat (limited to 'otautil/SysUtil.cpp')
-rw-r--r-- | otautil/SysUtil.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/otautil/SysUtil.cpp b/otautil/SysUtil.cpp index dfa215073..48336ad07 100644 --- a/otautil/SysUtil.cpp +++ b/otautil/SysUtil.cpp @@ -14,8 +14,9 @@ * limitations under the License. */ -#include "SysUtil.h" +#include "otautil/SysUtil.h" +#include <errno.h> // TEMP_FAILURE_RETRY #include <fcntl.h> #include <stdint.h> // SIZE_MAX #include <sys/mman.h> @@ -100,7 +101,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 +136,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; |