From 54599fe33cb9e6b67cac618f97c9372f55ed0cee Mon Sep 17 00:00:00 2001 From: Dominik 'Rathann' Mierzejewski Date: Fri, 19 Jan 2024 18:57:54 +0100 Subject: [PATCH] fix build with GCC14 --- ags-gcc14.patch | 12 ++++++++++++ ags.spec | 4 ++++ 2 files changed, 16 insertions(+) create mode 100644 ags-gcc14.patch diff --git a/ags-gcc14.patch b/ags-gcc14.patch new file mode 100644 index 0000000..232ac24 --- /dev/null +++ b/ags-gcc14.patch @@ -0,0 +1,12 @@ +diff -up ags-3.6.0.56/libsrc/allegro/src/file.c.gcc14 ags-3.6.0.56/libsrc/allegro/src/file.c +--- ags-3.6.0.56/libsrc/allegro/src/file.c.gcc14 2024-01-08 22:35:50.000000000 +0100 ++++ ags-3.6.0.56/libsrc/allegro/src/file.c 2024-01-19 18:55:20.780279527 +0100 +@@ -504,7 +504,7 @@ char *get_filename(AL_CONST char *path) + ptr = path; + ret = ptr; + for (;;) { +- c = ugetxc(&ptr); ++ c = ugetxc((char **)&ptr); + if (!c) break; + if ((c == '/') || (c == OTHER_PATH_SEPARATOR) || (c == DEVICE_SEPARATOR)) + ret = (char*)ptr; diff --git a/ags.spec b/ags.spec index 5211650..3a1bae5 100644 --- a/ags.spec +++ b/ags.spec @@ -15,6 +15,8 @@ Version: 3.6.0.56 URL: http://www.adventuregamestudio.co.uk/site/ags/ Release: 1%{?dist} Source0: https://github.com/adventuregamestudio/ags/archive/%{fver}/ags-%{fver}.tar.gz +# fix build with GCC14 +Patch0: %{name}-gcc14.patch # unbundle freetype Patch2: %{name}-use-system-freetype.patch # use openal-soft @@ -67,6 +69,7 @@ since continued to be developed by contributors. %prep %setup -q +%patch0 -p1 -b .gcc14 %if %{with freetype} %patch2 -p1 -b .noft %endif @@ -117,6 +120,7 @@ make V=1 -C Engine PREFIX=%{buildroot}%{_prefix} install %changelog * Fri Jan 19 2024 Dominik Mierzejewski - 3.6.0.56-1 - update to 3.6.0.56 +- fix build with GCC14 * Fri Jan 19 2024 Fedora Release Engineering - 3.6.0.51-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild