filesrc: enable large file support in Android
authorReynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
Tue, 8 Dec 2015 04:27:45 +0000 (20:27 -0800)
committerReynaldo H. Verdejo Pinochet <reynaldo@osg.samsung.com>
Wed, 9 Dec 2015 22:15:26 +0000 (14:15 -0800)
https://bugzilla.gnome.org/show_bug.cgi?id=758980

plugins/elements/gstfilesrc.c

index f99245a..27ec84b 100644 (file)
 #  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