summaryrefslogtreecommitdiff
path: root/base/files/file_posix.cc
diff options
context:
space:
mode:
Diffstat (limited to 'base/files/file_posix.cc')
-rw-r--r--base/files/file_posix.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/base/files/file_posix.cc b/base/files/file_posix.cc
index bb49d2dd73..129f5faf4b 100644
--- a/base/files/file_posix.cc
+++ b/base/files/file_posix.cc
@@ -183,7 +183,9 @@ int64 File::Seek(Whence whence, int64 offset) {
SCOPED_FILE_TRACE_WITH_SIZE("Seek", offset);
-#if defined(OS_ANDROID)
+// Additionally check __BIONIC__ since older versions of Android don't define
+// _FILE_OFFSET_BITS.
+#if _FILE_OFFSET_BITS != 64 || defined(__BIONIC__)
COMPILE_ASSERT(sizeof(int64) == sizeof(off64_t), off64_t_64_bit);
return lseek64(file_.get(), static_cast<off64_t>(offset),
static_cast<int>(whence));