1# On Android, lseek64 should be used, whlie lseek should be in other platfrom. 2 3--- a/base/files/file_posix.cc 4+++ b/base/files/file_posix.cc 5@@ -189,7 +189,9 @@ int64_t File::Seek(Whence whence, int64_t offset) { 6 7 SCOPED_FILE_TRACE_WITH_SIZE("Seek", offset); 8 9-#if defined(OS_ANDROID) 10+// Additionally check __BIONIC__ since older versions of Android don't define 11+// _FILE_OFFSET_BITS. 12+#if _FILE_OFFSET_BITS != 64 || defined(__BIONIC__) 13 static_assert(sizeof(int64_t) == sizeof(off64_t), "off64_t must be 64 bits"); 14 return lseek64(file_.get(), static_cast<off64_t>(offset), 15 static_cast<int>(whence)); 16@@ -275,7 +277,7 @@ int File::Write(int64_t offset, const char* data, int size) { 17 int bytes_written = 0; 18 int rv; 19 do { 20-#if defined(OS_ANDROID) 21+#if _FILE_OFFSET_BITS != 64 || defined(__BIONIC__) 22 // In case __USE_FILE_OFFSET64 is not used, we need to call pwrite64() 23 // instead of pwrite(). 24 static_assert(sizeof(int64_t) == sizeof(off64_t),