diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-05-06 18:56:32 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2013-05-06 19:12:17 +0900 |
| commit | 5bc5665c6a7eaf95d90b78b415aea3ed00857835 (patch) | |
| tree | 1ff7d2c3dd62d77ea74c0ca934ecb1d7f7221d5e /src/AbstractDiskWriter.cc | |
| parent | 3a4acead2d49243ec3a4aa33cc8bded648b5647f (diff) | |
Support off64_t for Android build
Android NDK R8e does not provide ftruncate64, but bionic has the
assembler code to access kernel function. We borrowed those
ftruncate64.S files from android source code repository. It turns out
that x86 asm.h in NDK R8e is also broken, so latest asm.h was also
borrowed.
Diffstat (limited to 'src/AbstractDiskWriter.cc')
| -rw-r--r-- | src/AbstractDiskWriter.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/AbstractDiskWriter.cc b/src/AbstractDiskWriter.cc index 578f64e9..2e5a5357 100644 --- a/src/AbstractDiskWriter.cc +++ b/src/AbstractDiskWriter.cc @@ -324,7 +324,7 @@ void AbstractDiskWriter::seek(int64_t offset) fileLength.QuadPart = offset; if(SetFilePointerEx(fd_, fileLength, 0, FILE_BEGIN) == 0) #else // !__MINGW32__ - if(a2lseek(fd_, offset, SEEK_SET) == (off_t)-1) + if(a2lseek(fd_, offset, SEEK_SET) == (a2_off_t)-1) #endif // !__MINGW32__ { int errNum = fileError(); @@ -453,7 +453,7 @@ void AbstractDiskWriter::truncate(int64_t length) seek(length); if(SetEndOfFile(fd_) == 0) #else // !__MINGW32__ - if(ftruncate(fd_, length) == -1) + if(a2ftruncate(fd_, length) == -1) #endif // !__MINGW32__ { int errNum = fileError(); |
