diff --git a/glib2-solve-compile-error-for-ilp32.patch b/glib2-solve-compile-error-for-ilp32.patch new file mode 100644 index 0000000000000000000000000000000000000000..3c0f425ab766bcb375152fadc7221ea488560070 --- /dev/null +++ b/glib2-solve-compile-error-for-ilp32.patch @@ -0,0 +1,67 @@ +diff -uprN glib-2.72.2.orig/gobject/gclosure.c glib-2.72.2/gobject/gclosure.c +--- glib-2.72.2.orig/gobject/gclosure.c 2022-05-30 13:26:47.000000000 +0000 ++++ glib-2.72.2/gobject/gclosure.c 2023-03-16 12:59:26.260559263 +0000 +@@ -1302,7 +1302,11 @@ restart: + g_value_set_boolean (gvalue, (gboolean) *int_val); + break; + case G_TYPE_STRING: ++#ifdef __ILP32__ ++ g_value_take_string (gvalue, (gchar*) *int_val); ++#else + g_value_take_string (gvalue, *(gchar**)value); ++#endif + break; + case G_TYPE_CHAR: + g_value_set_schar (gvalue, (gint8) *int_val); +diff -uprN glib-2.72.2.orig/meson.build glib-2.72.2/meson.build +--- glib-2.72.2.orig/meson.build 2022-05-30 13:26:47.000000000 +0000 ++++ glib-2.72.2/meson.build 2023-03-23 02:43:47.110155246 +0000 +@@ -1564,6 +1564,40 @@ if cc.get_id() == 'gcc' or cc.get_id() = + } + endif + ++if host_system == 'linux-gnu_ilp32' ++if g_sizet_compatibility['short'] ++ glibconfig_conf.set('glib_size_type_define', 'short') ++ glibconfig_conf.set_quoted('gsize_modifier', 'h') ++ glibconfig_conf.set_quoted('gssize_modifier', 'h') ++ glibconfig_conf.set_quoted('gsize_format', 'hu') ++ glibconfig_conf.set_quoted('gssize_format', 'hi') ++ glibconfig_conf.set('glib_msize_type', 'SHRT') ++elif g_sizet_compatibility['long'] ++ glibconfig_conf.set('glib_size_type_define', 'long') ++ glibconfig_conf.set_quoted('gsize_modifier', 'l') ++ glibconfig_conf.set_quoted('gssize_modifier', 'l') ++ glibconfig_conf.set_quoted('gsize_format', 'lu') ++ glibconfig_conf.set_quoted('gssize_format', 'li') ++ glibconfig_conf.set('glib_msize_type', 'LONG') ++elif g_sizet_compatibility['int'] ++ glibconfig_conf.set('glib_size_type_define', 'int') ++ glibconfig_conf.set_quoted('gsize_modifier', '') ++ glibconfig_conf.set_quoted('gssize_modifier', '') ++ glibconfig_conf.set_quoted('gsize_format', 'u') ++ glibconfig_conf.set_quoted('gssize_format', 'i') ++ glibconfig_conf.set('glib_msize_type', 'INT') ++elif g_sizet_compatibility['long long'] ++ glibconfig_conf.set('glib_size_type_define', 'long long') ++ glibconfig_conf.set_quoted('gsize_modifier', int64_m) ++ glibconfig_conf.set_quoted('gssize_modifier', int64_m) ++ glibconfig_conf.set_quoted('gsize_format', int64_m + 'u') ++ glibconfig_conf.set_quoted('gssize_format', int64_m + 'i') ++ glibconfig_conf.set('glib_msize_type', 'INT64') ++else ++ error('Could not determine size of size_t.') ++endif ++ ++else + if g_sizet_compatibility['short'] + glibconfig_conf.set('glib_size_type_define', 'short') + glibconfig_conf.set_quoted('gsize_modifier', 'h') +@@ -1595,6 +1629,7 @@ elif g_sizet_compatibility['long long'] + else + error('Could not determine size of size_t.') + endif ++endif + + if voidp_size == int_size + glibconfig_conf.set('glib_intptr_type_define', 'int') diff --git a/glib2.spec b/glib2.spec index 7d82da98bbb1b7e160c428d258201e72c81bd715..a7cbbac75b7702210c25085c8fda8ff75833cfc7 100644 --- a/glib2.spec +++ b/glib2.spec @@ -1,11 +1,12 @@ Name: glib2 Version: 2.72.2 -Release: 9 +Release: 10 Summary: The core library that forms the basis for projects such as GTK+ and GNOME License: LGPLv2+ URL: http://www.gtk.org Source0: https://download.gnome.org/sources/glib/2.71/glib-%{version}.tar.xz +Patch0: glib2-solve-compile-error-for-ilp32.patch Patch6000: backport-add-version-macros-for-GLib-2.74.patch Patch6001: backport-gtype-Add-G_TYPE_FLAG_NONE.patch Patch6002: backport-gioenums-Add-G_TLS_CERTIFICATE_FLAGS_NONE.patch @@ -255,6 +256,9 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || : %endif %changelog +* Thu Mar 23 2023 EibzChan - 2.72.2-10 +- fix compile error for ilp32 + * Tue Mar 14 2023 hanhuihui - 2.72.2-9 - fix a use-after-free of GDBusMethodInvocation