Merge branch 'resources-alignment' into 'main'

glib-compile-resources: ensure alignment is at least sizeof(void *)

See merge request GNOME/glib!3630
This commit is contained in:
Philip Withnall 2023-10-10 21:23:46 +00:00
commit 2f5088b7b6

View File

@ -1196,7 +1196,7 @@ main (int argc, char **argv)
"#include <gio/gio.h>\n" "#include <gio/gio.h>\n"
"\n" "\n"
"#if defined (__ELF__) && ( __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 6))\n" "#if defined (__ELF__) && ( __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 6))\n"
"# define SECTION __attribute__ ((section (\".gresource.%s\"), aligned (8)))\n" "# define SECTION __attribute__ ((section (\".gresource.%s\"), aligned (sizeof(void *) > 8 ? sizeof(void *) : 8)))\n"
"#else\n" "#else\n"
"# define SECTION\n" "# define SECTION\n"
"#endif\n" "#endif\n"