[PATCH 3/6] libdrm: fix the Android 64bit build

Stéphane Marchesin stephane.marchesin at gmail.com
Thu Jan 29 11:00:46 PST 2015


On Thu, Jan 29, 2015 at 10:47 AM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> With 64bit bionic mmap now handles 64bit offset, thus we no longer
> need the __mmap2 trick.
>
> Fix from Chih-Wei Huang, over at the google forums.
>
> Cc: Chih-Wei Huang <cwhuang at android-x86.org>
> Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
> ---
>  libdrm.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libdrm.h b/libdrm.h
> index acfada5..6c3cd59 100644
> --- a/libdrm.h
> +++ b/libdrm.h
> @@ -45,7 +45,7 @@
>
>  #include <sys/mman.h>
>
> -#if defined(ANDROID)
> +#if defined(ANDROID) && !defined(__LP64__)
>  #include <errno.h> /* for EINVAL */
>
>  extern void *__mmap2(void *, size_t, int, int, int, size_t);

It seems like you're be better off just using mmap64 instead of __mpap2?

Stéphane


More information about the dri-devel mailing list