summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>2015-12-07 20:27:45 -0800
committerSebastian Dröge <sebastian@centricular.com>2015-12-10 10:03:48 +0200
commit4347718bf1b014ef72b971f7d56d34ea421c091b (patch)
treeaf33779d13b156fa284bca70f129a705832511cd
parentb08946cd1bb24943fcc41e545ae345c500c33252 (diff)
downloadgstreamer-4347718bf1b014ef72b971f7d56d34ea421c091b.tar.gz
filesrc: enable large file support in Android
https://bugzilla.gnome.org/show_bug.cgi?id=758980
-rw-r--r--plugins/elements/gstfilesrc.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/plugins/elements/gstfilesrc.c b/plugins/elements/gstfilesrc.c
index f99245a79a..27ec84bf9a 100644
--- a/plugins/elements/gstfilesrc.c
+++ b/plugins/elements/gstfilesrc.c
@@ -65,6 +65,15 @@
# include <unistd.h>
#endif
+#ifdef __BIONIC__ /* Android */
+#undef lseek
+#define lseek lseek64
+#undef fstat
+#define fstat fstat64
+#undef off_t
+#define off_t guint64
+#endif
+
#include <errno.h>
#include <string.h>
@@ -111,6 +120,8 @@ gst_open (const gchar * filename, int flags, int mode)
errno = save_errno;
return retval;
+#elif defined (__BIONIC__)
+ return open (filename, flags | O_LARGEFILE, mode);
#else
return open (filename, flags, mode);
#endif