mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 18:10:11 +01:00
util: Use the gcc_struct attribute for packed structures in mingw
Actually set the packing behavior as the intended one when using this attribute, even on mingw. Otherwise, the default behavior is to use the ms_struct which makes the structures use more space in some situations. Signed-off-by: Corentin Noël <corentin.noel@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23338>
This commit is contained in:
parent
b06be7c002
commit
86532fa21d
1 changed files with 5 additions and 1 deletions
|
|
@ -204,7 +204,11 @@ do { \
|
||||||
* packed, to trade off performance for space.
|
* packed, to trade off performance for space.
|
||||||
*/
|
*/
|
||||||
#ifdef HAVE_FUNC_ATTRIBUTE_PACKED
|
#ifdef HAVE_FUNC_ATTRIBUTE_PACKED
|
||||||
#define PACKED __attribute__((__packed__))
|
# if defined(__MINGW32__) || defined(__MINGW64__)
|
||||||
|
# define PACKED __attribute__((gcc_struct,__packed__))
|
||||||
|
# else
|
||||||
|
# define PACKED __attribute__((__packed__))
|
||||||
|
# endif
|
||||||
#else
|
#else
|
||||||
#define PACKED
|
#define PACKED
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue