projects
/
libs
/
core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
06fa898
)
Hack to make 64-bit seeks work on Android
author
Mikko Rasa
<tdb@tdb.fi>
Thu, 19 Nov 2015 16:49:52 +0000
(18:49 +0200)
committer
Mikko Rasa
<tdb@tdb.fi>
Thu, 19 Nov 2015 16:49:52 +0000
(18:49 +0200)
source/io/unix/seekable.cpp
patch
|
blob
|
history
diff --git
a/source/io/unix/seekable.cpp
b/source/io/unix/seekable.cpp
index 93a6e86e1f8427635f5f7da38ac825e7c8fe3a3f..a402742a52338b7ba2d5f17cd639d6b37ca18c84 100644
(file)
--- a/
source/io/unix/seekable.cpp
+++ b/
source/io/unix/seekable.cpp
@@
-29,6
+29,13
@@
int sys_seek_type(SeekType st)
namespace Msp {
namespace IO {
+/* Android libc does not recognize _FILE_OFFSET_BITS so this hack is necessary
+to get 64-bit seeks. */
+#ifdef __ANDROID__
+#define off_t off64_t
+#define lseek lseek64
+#endif
+
SeekOffset sys_seek(Handle &handle, SeekOffset offset, SeekType type)
{
off_t ret = lseek(*handle, offset, sys_seek_type(type));