fastboot: Fix fastboot_vendor_boot_img_utils_test mac os compilation
Use more universal lseek instead of lseek64 Test: atest fastboot_vendor_boot_img_utils_test Test: mm on mac os Bug: 271152365 Change-Id: I4d094dd2c24e4ffec8ea7fe2f3b355122fd8cd19 Signed-off-by: Dmitrii Merkurev <dimorinny@google.com>
This commit is contained in:
parent
396b107a41
commit
95c90c6588
1 changed files with 2 additions and 2 deletions
|
@ -73,8 +73,8 @@ Result<uint64_t> FileSize(borrowed_fd fd, std::filesystem::path path) {
|
|||
|
||||
// Seek to beginning then read the whole file.
|
||||
Result<std::string> ReadStartOfFdToString(borrowed_fd fd, std::filesystem::path path) {
|
||||
if (lseek64(fd.get(), 0, SEEK_SET) != 0)
|
||||
return ErrnoError() << "lseek64(" << path << ", 0, SEEK_SET)";
|
||||
if (lseek(fd.get(), 0, SEEK_SET) != 0)
|
||||
return ErrnoError() << "lseek(" << path << ", 0, SEEK_SET)";
|
||||
std::string content;
|
||||
if (!android::base::ReadFdToString(fd, &content)) return ErrnoError() << "read(" << path << ")";
|
||||
return content;
|
||||
|
|
Loading…
Reference in a new issue