projects
/
profile
/
extras
/
intel-gpu-tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e72f3bc
)
android: Handle the case when android doesn't have mmap64
author
Rafael Barbalho
<rafael.barbalho@intel.com>
Fri, 31 Jan 2014 14:57:36 +0000
(14:57 +0000)
committer
Damien Lespiau
<damien.lespiau@intel.com>
Tue, 4 Feb 2014 10:51:46 +0000
(10:51 +0000)
Not all versions of Android have the mmap64 call, thus a suitable alternative
must be called.
Signed-off-by: Rafael Barbalho <rafael.barbalho@intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
lib/intel_gpu_tools.h
patch
|
blob
|
history
diff --git
a/lib/intel_gpu_tools.h
b/lib/intel_gpu_tools.h
index
b242243
..
1ae1bab
100644
(file)
--- a/
lib/intel_gpu_tools.h
+++ b/
lib/intel_gpu_tools.h
@@
-35,6
+35,17
@@
#include "intel_chipset.h"
#include "intel_reg.h"
+#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,
+ int fd, off64_t offset)
+{
+ return __mmap2(addr, length, prot, flags, fd, offset >> 12);
+}
+#endif
+#endif
+
#define ARRAY_SIZE(arr) (sizeof(arr)/sizeof(arr[0]))
extern void *mmio;