diff --git a/gtk+-1.2.10-ptrtype.patch b/gtk+-1.2.10-ptrtype.patch new file mode 100644 index 0000000..f1edc43 --- /dev/null +++ b/gtk+-1.2.10-ptrtype.patch @@ -0,0 +1,26 @@ +This resolves the error: + +gdkwindow.c: In function 'gdk_window_set_icon_name': +gdkwindow.c:2081:36: error: passing argument 2 of 'XmbTextListToTextProperty' from incompatible pointer type + 2081 | &name, 1, XStdICCTextStyle, + | ^~~~~ + | | + | const gchar ** {aka const char **} + +The XmbTextListToTextProperty doesn't actually change anything via its second argument, +so it could have been declared 'const char **' rather than 'char **' but it's an ancient +API that pre-dates widespread use of 'const'. + +Casting to 'char **' is the same approach as used in gtk3. + +--- gtk+-1.2.10/gdk/gdkwindow.c ++++ gtk+-1.2.10/gdk/gdkwindow.c +@@ -2078,7 +2078,7 @@ gdk_window_set_icon_name (GdkWindow *w + if (window_private->destroyed) + return; + res = XmbTextListToTextProperty (window_private->xdisplay, +- &name, 1, XStdICCTextStyle, ++ (char **)&name, 1, XStdICCTextStyle, + &property); + if (res < 0) + { diff --git a/gtk+.spec b/gtk+.spec index 640caa1..9ef1507 100644 --- a/gtk+.spec +++ b/gtk+.spec @@ -2,7 +2,7 @@ Summary: The GIMP ToolKit Name: gtk+ Epoch: 1 Version: 1.2.10 -Release: 104%{?dist} +Release: 105%{?dist} License: LGPL-2.0-or-later URL: http://www.gtk.org/ Source0: https://ftp.gnome.org/pub/gnome/sources/gtk+/1.2/gtk+-%{version}.tar.gz @@ -85,6 +85,8 @@ Patch36: gtk+-1.2.10-autotools.patch Patch37: gtk+-1.2.10-format.patch # C99 compiler support Patch38: gtk+-1.2.10-c99.patch +# Fix incompatible pointer type in call to XmbTextListToTextProperty +Patch39: gtk+-1.2.10-ptrtype.patch BuildRequires: coreutils BuildRequires: gettext @@ -152,6 +154,7 @@ Libraries, header files and documentation for developing GTK+ %patch -P 36 -p0 -b .autotools %patch -P 37 -p0 -b .format %patch -P 38 -p1 -b .c99 +%patch -P 39 -p1 -b .ptrtype # The original config.{guess,sub} do not work on x86_64, aarch64 etc. # @@ -245,6 +248,9 @@ make check LIBTOOL=/usr/bin/libtool %{_mandir}/man1/gtk-config.1* %changelog +* Tue Dec 12 2023 Paul Howarth - 1:1.2.10-105 +- Fix incompatible pointer type in call to XmbTextListToTextProperty + * Thu Jul 20 2023 Fedora Release Engineering - 1:1.2.10-104 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild