From 95c90c6588bb14da1e797de4898d27fab770ddd8 Mon Sep 17 00:00:00 2001 From: Dmitrii Merkurev Date: Wed, 1 Mar 2023 15:47:58 +0000 Subject: [PATCH] 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 --- fastboot/vendor_boot_img_utils_test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fastboot/vendor_boot_img_utils_test.cpp b/fastboot/vendor_boot_img_utils_test.cpp index 1563b89c7..467c6e9d9 100644 --- a/fastboot/vendor_boot_img_utils_test.cpp +++ b/fastboot/vendor_boot_img_utils_test.cpp @@ -73,8 +73,8 @@ Result FileSize(borrowed_fd fd, std::filesystem::path path) { // Seek to beginning then read the whole file. Result 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;