Index: nspr/pr/src/md/unix/unix.c |
diff --git a/nspr/pr/src/md/unix/unix.c b/nspr/pr/src/md/unix/unix.c |
index 38f7be9b3ef6266acca343a6f3298aec960fb2c0..4f27b82fff9ab48bc049895af2ce8fea44fdbee0 100644 |
--- a/nspr/pr/src/md/unix/unix.c |
+++ b/nspr/pr/src/md/unix/unix.c |
@@ -21,6 +21,10 @@ |
#include <poll.h> |
#endif |
+#if defined(ANDROID) |
+#include <android/api-level.h> |
+#endif |
+ |
/* To get FIONREAD */ |
#if defined(UNIXWARE) |
#include <sys/filio.h> |
@@ -2709,8 +2713,8 @@ static void* _MD_Unix_mmap64( |
} /* _MD_Unix_mmap64 */ |
#endif /* defined(_PR_NO_LARGE_FILES) || defined(SOLARIS2_5) */ |
-/* Android doesn't have mmap64. */ |
-#if defined(ANDROID) |
+/* Android <= 19 doesn't have mmap64. */ |
+#if defined(ANDROID) && __ANDROID_API__ <= 19 |
extern void *__mmap2(void *, size_t, int, int, int, size_t); |
#define ANDROID_PAGE_SIZE 4096 |