From 556f7c16363330aabeb0b95b93719a0d66af4b7f Mon Sep 17 00:00:00 2001 From: WuZhen Date: Wed, 6 Jan 2016 17:34:56 +0800 Subject: add padding to gralloc_drm_handle_t gralloc_drm_handle_t size differs for 32/64 bit process. thus on x86_64, this will crash any 32bit app, add propper padding. Change-Id: I03663b36dd841bf69c84973fd2f5e99741317c15 --- gralloc_drm_handle.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gralloc_drm_handle.h b/gralloc_drm_handle.h index f9cc626..f5b6aa0 100644 --- a/gralloc_drm_handle.h +++ b/gralloc_drm_handle.h @@ -49,7 +49,10 @@ struct gralloc_drm_handle_t { int stride; /* the stride in bytes */ int data_owner; /* owner of data (for validation) */ - struct gralloc_drm_bo_t *data; /* pointer to struct gralloc_drm_bo_t */ + union { + struct gralloc_drm_bo_t *data; /* pointer to struct gralloc_drm_bo_t */ + int64_t __padding; + }; }; #define GRALLOC_DRM_HANDLE_MAGIC 0x12345678 -- cgit v1.1