Backport upstream patch to fix C99 compatibility issue

Related to:

  <https://fedoraproject.org/wiki/Changes/PortingToModernC>
  <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
This commit is contained in:
Florian Weimer 2023-04-11 08:53:34 +02:00
parent 94932ce605
commit 595aab443e
2 changed files with 47 additions and 1 deletions

42
gtk2-c99.patch Normal file
View File

@ -0,0 +1,42 @@
commit bcfc53066ae54d0adbf282d5678d9a4a7083b4d3
Author: Javier Jardón <jjardon@gnome.org>
Date: Mon May 3 02:56:29 2010 +0200
tests: Too many arguments in call to 'create_menu'
diff --git a/tests/testmenubars.c b/tests/testmenubars.c
index 416a93986121d858..853d822a9b6a7925 100644
--- a/tests/testmenubars.c
+++ b/tests/testmenubars.c
@@ -21,7 +21,7 @@
#include <gtk/gtk.h>
static GtkWidget *
-create_menu (depth)
+create_menu (guint depth)
{
GtkWidget *menu;
GtkWidget *menuitem;
@@ -70,19 +70,19 @@ create_menubar (GtkPackDirection pack_dir,
menuitem = gtk_image_menu_item_new_from_stock (GTK_STOCK_HOME, NULL);
gtk_menu_shell_append (GTK_MENU_SHELL (menubar), menuitem);
gtk_label_set_angle (GTK_LABEL (GTK_BIN (menuitem)->child), angle);
- menu = create_menu (2, TRUE);
+ menu = create_menu (2);
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), menu);
menuitem = gtk_menu_item_new_with_label ("foo");
gtk_menu_shell_append (GTK_MENU_SHELL (menubar), menuitem);
gtk_label_set_angle (GTK_LABEL (GTK_BIN (menuitem)->child), angle);
- menu = create_menu (2, TRUE);
+ menu = create_menu (2);
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), menu);
menuitem = gtk_menu_item_new_with_label ("bar");
gtk_menu_shell_append (GTK_MENU_SHELL (menubar), menuitem);
gtk_label_set_angle (GTK_LABEL (GTK_BIN (menuitem)->child), angle);
- menu = create_menu (2, TRUE);
+ menu = create_menu (2);
gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem), menu);
return menubar;

View File

@ -20,7 +20,7 @@
Summary: GTK+ graphical user interface library
Name: gtk2
Version: 2.24.33
Release: 13%{?dist}
Release: 14%{?dist}
License: LGPLv2+
URL: http://www.gtk.org
#VCS: git:git://git.gnome.org/gtk+#gtk-2-24
@ -35,6 +35,7 @@ Patch2: icon-padding.patch
Patch8: tooltip-positioning.patch
# https://bugzilla.gnome.org/show_bug.cgi?id=611313
Patch15: window-dragging.patch
Patch16: gtk2-c99.patch
BuildRequires: pkgconfig(atk) >= %{atk_version}
BuildRequires: pkgconfig(glib-2.0) >= %{glib2_version}
@ -334,6 +335,9 @@ gtk-query-immodules-2.0-%{__isa_bits} --update-cache
%doc tmpdocs/examples
%changelog
* Tue Apr 11 2023 Florian Weimer <fweimer@redhat.com> - 2.24.33-14
- Backport upstream patch to fix C99 compatibility issue
* Wed Feb 01 2023 Yaakov Selkowitz <yselkowi@redhat.com> - 2.24.33-13
- Make the gtk-immodules-imsettings subpackage noarch