[libbluray-devel] Fix Android build

hpi1 git at videolan.org
Tue Nov 24 16:38:19 CET 2015


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Tue Nov 24 17:37:05 2015 +0200| [ce39231552af434be17f1c845bcfc0ab22624f4d] | committer: hpi1

Fix Android build

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=ce39231552af434be17f1c845bcfc0ab22624f4d
---

 ChangeLog             |    1 +
 contrib/libudfread    |    2 +-
 src/file/file_posix.c |    7 +++++++
 src/file/mount.c      |    2 ++
 4 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index cab0a08..e9bcc96 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,5 @@
 - Add primary audio stream to bd_select_stream().
+- Fix Android build.
 - Fix SecurityException in AWTAutoShutdown.
 - Fix BD-J check when install path in Windows contains non-ASCII chars.
 - Fix jvm.dll loading in Windows ($JAVA_HOME/bin should be in dll load path).
diff --git a/contrib/libudfread b/contrib/libudfread
index 953fda2..9e1e986 160000
--- a/contrib/libudfread
+++ b/contrib/libudfread
@@ -1 +1 @@
-Subproject commit 953fda2f8a9e5ee24e19393d53e93f5efb5833e2
+Subproject commit 9e1e9865ffc261016ac164c0e00602c0f6f4fda9
diff --git a/src/file/file_posix.c b/src/file/file_posix.c
index 753a8ce..2a79f6f 100644
--- a/src/file/file_posix.c
+++ b/src/file/file_posix.c
@@ -38,6 +38,13 @@
 #include <sys/stat.h>
 #include <fcntl.h>
 
+#ifdef __ANDROID__
+# undef  lseek
+# define lseek lseek64
+# undef  off_t
+# define off_t off64_t
+#endif
+
 static void _file_close(BD_FILE_H *file)
 {
     if (file) {
diff --git a/src/file/mount.c b/src/file/mount.c
index 6382d8b..7575f89 100644
--- a/src/file/mount.c
+++ b/src/file/mount.c
@@ -33,6 +33,7 @@
 
 char *mount_get_mountpoint(const char *device_path)
 {
+#ifndef __ANDROID__
 #ifdef HAVE_MNTENT_H
     struct stat st;
     if (stat (device_path, &st) ) {
@@ -62,6 +63,7 @@ char *mount_get_mountpoint(const char *device_path)
         endmntent (f);
     }
 #endif /* HAVE_MNTENT_H */
+#endif /*  __ANDROID__ */
 
     return str_dup(device_path);
 }



More information about the libbluray-devel mailing list