Skip to content
Unverified Commit 35affe89 authored by John Stultz's avatar John Stultz Committed by Robert Foss
Browse files

libdrm: gralloc_handle.h: Fix build issue with Android



In trying to integrate the new gralloc_handle.h with the
drm_hwcomposer, I started seeing the following compilation
errors:

In file included from external/drm_hwcomposer/platformdrmgeneric.cpp:28:
external/libdrm/android/gralloc_handle.h:108:9: error: cannot initialize return object of type 'native_handle_t *' (aka 'native_handle *') with an lvalue of type 'struct gralloc_handle_t *'
        return handle;
               ^~~~~~
1 error generated.

This seems to be due to the gralloc_handle_create() definition
needs to return a native_handle_t * type, rather then a
gralloc_handle_t *, which is what the code actually returns.

After talking w/ Rob Herring, having the code return the
native handle should be the proper fix, so that is what
this patch changes.

Cc: Chih-Wei Huang <cwhuang@android-x86.org>
Cc: Stefan Schake <stschake@gmail.com>
Cc: Robert Foss <robert.foss@collabora.com>
Cc: Sean Paul <seanpaul@google.com>
Cc: Rob Herring <robh@kernel.org>

Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
Reviewed-by: default avatarRobert Foss <robert.foss@collabora.com>
parent 8ec043ec
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment