summaryrefslogtreecommitdiffstats
path: root/libcpu
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2017-04-07 13:34:10 +0200
committerUlf Hermann <ulf.hermann@qt.io>2017-05-02 12:43:15 +0000
commit764dfcb97f5728cb7f4a20f38b3df5f8bd00e05f (patch)
tree30b16069a01cdb363bdccd53b6b1f73f03ea9bdd /libcpu
parentcb951df3eaff5228d3900f38b71e550425b72670 (diff)
Make sure packed structs follow the gcc memory layout
On windows gcc by default generates code that follows the MSVC layout. We don't want that as it adds extra padding. Change-Id: I92efe5da2a2ad818783707ee96a9b8e0eb606dbd Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'libcpu')
-rw-r--r--libcpu/memory-access.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/libcpu/memory-access.h b/libcpu/memory-access.h
index 44210e2f..779825fa 100644
--- a/libcpu/memory-access.h
+++ b/libcpu/memory-access.h
@@ -90,7 +90,7 @@ union unaligned
int16_t s2;
int32_t s4;
int64_t s8;
- } __attribute__ ((packed));
+ } attribute_packed;
static inline uint16_t
read_2ubyte_unaligned (const void *p)