Index: base/files/file_posix.cc |
diff --git a/base/files/file_posix.cc b/base/files/file_posix.cc |
index 0764ee98660239ed813ada6d0dd0a7b15429aeee..59d9e3dd0d047dc2e4301a844da56cb4c364e80a 100644 |
--- a/base/files/file_posix.cc |
+++ b/base/files/file_posix.cc |
@@ -280,11 +280,16 @@ void File::Close() { |
int64 File::Seek(Whence whence, int64 offset) { |
base::ThreadRestrictions::AssertIOAllowed(); |
DCHECK(IsValid()); |
- if (offset < 0) |
- return -1; |
+#if defined(OS_ANDROID) |
+ COMPILE_ASSERT(sizeof(int64) == sizeof(off64_t), off64_t_bit); |
+ return lseek64(file_.get(), static_cast<off64_t>(offset), |
+ static_cast<int>(whence)); |
+#else |
+ COMPILE_ASSERT(sizeof(int64) == sizeof(off_t), off_t_64_bit); |
hashimoto
2014/06/19 01:51:56
nit: s/off_t_64_bit/off64_t_bit/?
rvargas (doing something else)
2014/06/19 17:11:43
Actually, the first message should be off64_t_64_b
|
return lseek(file_.get(), static_cast<off_t>(offset), |
static_cast<int>(whence)); |
+#endif |
} |
int File::Read(int64 offset, char* data, int size) { |