summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/drmtest.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/drmtest.h b/lib/drmtest.h
index fdf98c62..f3afbaa8 100644
--- a/lib/drmtest.h
+++ b/lib/drmtest.h
@@ -40,7 +40,11 @@
#ifdef ANDROID
#ifndef HAVE_MMAP64
extern void* __mmap2(void *, size_t, int, int, int, off_t);
-static inline void *mmap64(void *addr, size_t length, int prot, int flags,
+
+/* mmap64 is a recent addition to bionic and not available in all android builds. */
+/* I can find no reliable way to know if it is defined or not - so just avoid it */
+#define mmap64 igt_mmap64
+static inline void *igt_mmap64(void *addr, size_t length, int prot, int flags,
int fd, off64_t offset)
{
return __mmap2(addr, length, prot, flags, fd, offset >> 12);