[FFmpeg-devel] [PATCH] lavu/file: fix build on Android NDK with unified headers
Rodger Combs
rodger.combs at gmail.com
Tue Sep 26 04:52:17 EEST 2017
---
libavdevice/fbdev_enc.c | 1 +
libavformat/os_support.h | 6 ++++++
libavutil/file.c | 1 +
3 files changed, 8 insertions(+)
diff --git a/libavdevice/fbdev_enc.c b/libavdevice/fbdev_enc.c
index b4e5f84975..a9be608383 100644
--- a/libavdevice/fbdev_enc.c
+++ b/libavdevice/fbdev_enc.c
@@ -28,6 +28,7 @@
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "libavformat/avformat.h"
+#include "libavformat/os_support.h"
#include "fbdev_common.h"
#include "avdevice.h"
diff --git a/libavformat/os_support.h b/libavformat/os_support.h
index 91220e9716..54324603c9 100644
--- a/libavformat/os_support.h
+++ b/libavformat/os_support.h
@@ -65,6 +65,12 @@
# undef lseek
# endif
# define lseek(f,p,w) lseek64((f), (p), (w))
+# if defined(__USE_FILE_OFFSET64) && __ANDROID_API__ < 21 && !defined(__LP64__)
+# ifdef mmap
+# undef mmap
+# endif
+void* mmap(void*, size_t, int, int, int, __kernel_off_t);
+# endif
#endif
static inline int is_dos_path(const char *path)
diff --git a/libavutil/file.c b/libavutil/file.c
index 7bdf6cde84..c4b22539d0 100644
--- a/libavutil/file.c
+++ b/libavutil/file.c
@@ -21,6 +21,7 @@
#include "internal.h"
#include "log.h"
#include "mem.h"
+#include "libavformat/os_support.h"
#include <fcntl.h>
#include <sys/stat.h>
#if HAVE_UNISTD_H
--
2.14.1
More information about the ffmpeg-devel
mailing list