path: root/common/state/backend_format_raw.c
diff options
authorStefan Lengfeld <>2016-11-02 08:54:27 +0100
committerSascha Hauer <>2016-11-03 07:19:13 +0100
commit88b67f8ee47cee555342111481c252a39a390e44 (patch)
treef0c7bfac4aae4889163af2c0bf22ba83c5b5cb82 /common/state/backend_format_raw.c
parent28d5eb1bbc8681de635d145fa1d0edccb1571e0d (diff)
state: use packed attribute for on storage structs
These structs are used for on-storage data layouts. They should be not affected by different integer precisions and alignment optimizations of 32bit or 64bit machines. Using the architecture independent integer data types, like uint32_t, achieves the former, using the packed attribute the later. Signed-off-by: Stefan Lengfeld <> Signed-off-by: Sascha Hauer <>
Diffstat (limited to 'common/state/backend_format_raw.c')
1 files changed, 1 insertions, 1 deletions
diff --git a/common/state/backend_format_raw.c b/common/state/backend_format_raw.c
index 4209424..e028ea6 100644
--- a/common/state/backend_format_raw.c
+++ b/common/state/backend_format_raw.c
@@ -37,7 +37,7 @@ struct state_backend_format_raw {
struct device_d *dev;
-struct backend_raw_header {
+struct __attribute__((__packed__)) backend_raw_header {
uint32_t magic;
uint16_t reserved;
uint16_t data_len;