summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2016-03-23 15:48:39 -0500
committerChih-Wei Huang <cwhuang@linux.org.tw>2016-04-01 13:55:38 +0800
commit24e22e3e024d0779e4d93546c51e31816b7a6186 (patch)
tree6be3679c5202c2d8237b83b02d84627d7a877ab0
parentc04133951d10c4c17c0dfc9b86144b5a5957e17c (diff)
downloadexternal_drm_gralloc-24e22e3e024d0779e4d93546c51e31816b7a6186.zip
external_drm_gralloc-24e22e3e024d0779e4d93546c51e31816b7a6186.tar.gz
external_drm_gralloc-24e22e3e024d0779e4d93546c51e31816b7a6186.tar.bz2
Fix gralloc_drm_handle_t size mismatch on 32 and 64 bit builds, take 2
On x86 there was still a size mismatch due to x86-32 structs not following natural alignment for 64-bit values. Force the alignment of the union. Also, there appeared to be some padding on the end, so move the union to the end of the struct. Signed-off-by: Rob Herring <robh@kernel.org>
-rw-r--r--gralloc_drm_handle.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/gralloc_drm_handle.h b/gralloc_drm_handle.h
index ee96fbf..8e0ea95 100644
--- a/gralloc_drm_handle.h
+++ b/gralloc_drm_handle.h
@@ -55,7 +55,7 @@ struct gralloc_drm_handle_t {
union {
struct gralloc_drm_bo_t *data; /* pointer to struct gralloc_drm_bo_t */
int64_t __padding;
- };
+ } __attribute__((aligned(8)));
};
#define GRALLOC_DRM_HANDLE_MAGIC 0x12345678