Index: nspr/pr/src/md/unix/unix.c |
=================================================================== |
--- nspr/pr/src/md/unix/unix.c (revision 257452) |
+++ nspr/pr/src/md/unix/unix.c (working copy) |
@@ -30,6 +30,10 @@ |
#include <sys/statvfs.h> |
#endif |
+#if defined(ANDROID) |
+#include <android/api-level.h> |
+#endif |
+ |
/* |
* Make sure _PRSockLen_t is 32-bit, because we will cast a PRUint32* or |
* PRInt32* pointer to a _PRSockLen_t* pointer. |
@@ -2709,8 +2713,9 @@ |
} /* _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 __ANDROID_API__ <= 19 |
extern void *__mmap2(void *, size_t, int, int, int, size_t); |
#define ANDROID_PAGE_SIZE 4096 |
@@ -2724,7 +2729,8 @@ |
} |
return __mmap2(addr, len, prot, flags, fd, offset / ANDROID_PAGE_SIZE); |
} |
-#endif |
+#endif // __ANDROID_API__ <= 19 |
+#endif // defined(ANDROID) |
wtc
2014/07/22 23:45:12
Nit: use pre-C99 /* */ comment delimiters in this
|
#if defined(OSF1) && defined(__GNUC__) |