diff options
author | Sean Paul <seanpaul@chromium.org> | 2019-04-24 10:08:36 -0700 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2019-04-25 10:55:13 +0100 |
commit | ebbb8f9cbfc3b51d52e6fe3b146ea824030eb48a (patch) | |
tree | f1cdd9f59b9535054d06880c5f7e9760c8aa23fc /libdrm_macros.h | |
parent | 818033deff2ba1a3ed4e39b3f4a0c2f1da9b23eb (diff) | |
download | external_libdrm-ebbb8f9cbfc3b51d52e6fe3b146ea824030eb48a.tar.gz external_libdrm-ebbb8f9cbfc3b51d52e6fe3b146ea824030eb48a.tar.bz2 external_libdrm-ebbb8f9cbfc3b51d52e6fe3b146ea824030eb48a.zip |
libdrm: Use mmap64 instead of __mmap2
__mmap2 isn't supported on all platforms, mmap64 is the right way
to do this in android.
Also folds in a fix from Stéphane Marchesin <marcheu@chromium.org>
Cc: Sean Paul <seanpaul@chromium.org>
Cc: Alistair Strachan <astrachan@google.com>
Cc: Marissa Wall <marissaw@google.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
[jstultz: Folded in Stéphane's fix]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'libdrm_macros.h')
-rw-r--r-- | libdrm_macros.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libdrm_macros.h b/libdrm_macros.h index 95f0ef55..0dca8273 100644 --- a/libdrm_macros.h +++ b/libdrm_macros.h @@ -48,8 +48,6 @@ #if defined(ANDROID) && !defined(__LP64__) #include <errno.h> /* for EINVAL */ -extern void *__mmap2(void *, size_t, int, int, int, size_t); - static inline void *drm_mmap(void *addr, size_t length, int prot, int flags, int fd, loff_t offset) { @@ -59,7 +57,7 @@ static inline void *drm_mmap(void *addr, size_t length, int prot, int flags, return MAP_FAILED; } - return __mmap2(addr, length, prot, flags, fd, (size_t) (offset >> 12)); + return mmap64(addr, length, prot, flags, fd, offset); } # define drm_munmap(addr, length) \ |