diff mbox series

[4/7] hdata/i2c.c: fix building with gcc8

Message ID 20180529061810.28003-5-stewart@linux.ibm.com
State Accepted
Headers show
Series Build fixes for GCC8 / Fedora 28 | expand

Commit Message

Stewart Smith May 29, 2018, 6:18 a.m. UTC
hdata/test/../i2c.c:200:1: error: alignment 1 of ‘struct host_i2c_hdr’ is less than 4 [-Werror=packed-not-aligned]
 } __packed;
 ^

Fixes: https://github.com/open-power/skiboot/issues/160
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
---
 hdata/i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/hdata/i2c.c b/hdata/i2c.c
index 5cb56fafb120..9bbec665728c 100644
--- a/hdata/i2c.c
+++ b/hdata/i2c.c
@@ -197,7 +197,7 @@  static bool is_zeros(const void *p, size_t size)
 struct host_i2c_hdr {
 	const struct HDIF_array_hdr hdr;
 	__be32 version;
-} __packed;
+} __packed __align(0x4);
 
 int parse_i2c_devs(const struct HDIF_common_hdr *hdr, int idata_index,
 	struct dt_node *xscom)