fix copy large file issue over MTP on 32bit device
change offset variable type from off_t to loff_t, then it won't overflow
when the offset value is larger than 2GB.
change the pwrite and pread function to be pwrite64 and pread64 so the
offset parameter won't overflow.
Change-Id: I45947479a59a4240fd708787384bcadee09d8947
Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com>
diff --git a/media/mtp/PosixAsyncIO.h b/media/mtp/PosixAsyncIO.h
index 2bb5735..2bcae4c 100644
--- a/media/mtp/PosixAsyncIO.h
+++ b/media/mtp/PosixAsyncIO.h
@@ -32,7 +32,7 @@
int aio_fildes;
void *aio_buf;
- off_t aio_offset;
+ off64_t aio_offset;
size_t aio_nbytes;
// Used internally
@@ -61,7 +61,7 @@
ssize_t aio_return(struct aiocb *);
// Helper method for setting aiocb members
-void aio_prepare(struct aiocb *, void*, size_t, off_t);
+void aio_prepare(struct aiocb *, void*, size_t, off64_t);
#endif // POSIXASYNCIO_H