gvariant: Fix suffix alignment on 32-bit machines

This fixes commit 0b083e3d8c. The static assertion added in that commit
fails on 32-bit machines.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
This commit is contained in:
Philip Withnall 2024-09-29 12:45:13 +01:00
parent d3e0d4fbde
commit d50102f2d8
No known key found for this signature in database
GPG Key ID: DCDF5885B1F3ED73

View File

@ -76,7 +76,11 @@ struct _GVariant
gatomicrefcount ref_count; gatomicrefcount ref_count;
gsize depth; gsize depth;
#if g_macro__has_attribute(aligned)
guint8 suffix[] __attribute__((aligned(8)));
#else
guint8 suffix[]; guint8 suffix[];
#endif
}; };
/* Ensure our suffix data aligns to largest guaranteed offset /* Ensure our suffix data aligns to largest guaranteed offset