From d50102f2d8f0bdbb3308ab3d8ba46ef1483c09ba Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Sun, 29 Sep 2024 12:45:13 +0100 Subject: [PATCH] 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 --- glib/gvariant-core.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/glib/gvariant-core.c b/glib/gvariant-core.c index a8de6689c..7afef1b2f 100644 --- a/glib/gvariant-core.c +++ b/glib/gvariant-core.c @@ -76,7 +76,11 @@ struct _GVariant gatomicrefcount ref_count; gsize depth; +#if g_macro__has_attribute(aligned) + guint8 suffix[] __attribute__((aligned(8))); +#else guint8 suffix[]; +#endif }; /* Ensure our suffix data aligns to largest guaranteed offset