diff options
author | Michal Suchanek <msuchanek@suse.de> | 2019-07-23 11:46:15 +0200 |
---|---|---|
committer | Vasant Hegde <hegdevasant@linux.vnet.ibm.com> | 2019-08-06 14:19:27 +0530 |
commit | e92d8dc9dd326fbe189c64b25fab8c8aa2cae3e0 (patch) | |
tree | 58796cbfd700f4076bb46bc724ba3399d9923033 | |
parent | 35c24ebce598818606528656ad93f4286d88e474 (diff) | |
download | skiboot-e92d8dc9dd326fbe189c64b25fab8c8aa2cae3e0.zip skiboot-e92d8dc9dd326fbe189c64b25fab8c8aa2cae3e0.tar.gz skiboot-e92d8dc9dd326fbe189c64b25fab8c8aa2cae3e0.tar.bz2 |
errorlog: Prevent alignment error building with gcc9.
[ Upstream commit 6080c106e797ea8375ac164e8f53de3308d42abb ]
Fixes this build error:
[ 52s] hw/fsp/fsp-elog-write.c: In function 'opal_elog_read':
[ 52s] hw/fsp/fsp-elog-write.c:213:12: error: taking address of packed member of 'struct errorlog' may result in an unaligned pointer value [-Werror=address-of-packed-member]
[ 52s] 213 | list_del(&log_data->link);
[ 52s] | ^~~~~~~~~~~~~~~
Fixes: https://github.com/open-power/skiboot/issues/247
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
-rw-r--r-- | include/errorlog.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/errorlog.h b/include/errorlog.h index 6da9664..b4cc163 100644 --- a/include/errorlog.h +++ b/include/errorlog.h @@ -119,7 +119,7 @@ struct __attribute__((__packed__))elog_user_data_section { * needs to populate this structure using pre-defined interfaces * only */ -struct __attribute__((__packed__)) errorlog { +struct __attribute__((__packed__)) __attribute__ ((aligned (8))) errorlog { uint16_t component_id; uint8_t error_event_type; |