diff --git a/clover2-11.0.0-0003-Fix-Wincompatible-pointer-types-warning.patch b/clover2-11.0.0-0003-Fix-Wincompatible-pointer-types-warning.patch new file mode 100644 index 0000000..5de3849 --- /dev/null +++ b/clover2-11.0.0-0003-Fix-Wincompatible-pointer-types-warning.patch @@ -0,0 +1,27 @@ +From 73f9fe3d40d3881223f3a9776732e31bdc8a459f Mon Sep 17 00:00:00 2001 +From: Tom Stellard +Date: Sat, 8 Nov 2025 15:45:20 +0000 +Subject: [PATCH] Fix [-Wincompatible-pointer-types] warning + +This fixes the build with clang >= 22 which has this warning as an +error by default. +--- + src/interpreter.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/interpreter.c b/src/interpreter.c +index 44dfaa6..4708e7c 100644 +--- a/src/interpreter.c ++++ b/src/interpreter.c +@@ -945,7 +945,7 @@ void command_completion() + struct stat stat_; + if(stat(path2, &stat_) == 0) { + if(stat_.st_mode & S_IXUSR) { +- char* entry_d_name[PATH_MAX]; ++ char entry_d_name[PATH_MAX]; + + char* p = entry->d_name; + char* p2 = entry_d_name; +-- +2.50.1 + diff --git a/clover2.spec b/clover2.spec index 44d3f47..1cc01d6 100644 --- a/clover2.spec +++ b/clover2.spec @@ -15,7 +15,7 @@ Name: clover2 # For Version, see README.md and so on Version: %{mainver} -Release: 12%{?dist} +Release: 13%{?dist} Summary: Yet another compiler language # app-sample/ unused @@ -29,6 +29,8 @@ Source1: create-clover-git-bare-tarball.sh Patch1: clover2-11.0.0-0001-port-to-pcre2.patch # block TCGETA usage on ppc64le for now on 2.42 Patch2: clover2-11.0.0-0002-block-TCGETA-usage-on-ppc64le.patch +# Fix build with clang >= 22. +Patch3: clover2-11.0.0-0003-Fix-Wincompatible-pointer-types-warning.patch # Upstream suggests to use clang BuildRequires: clang @@ -98,6 +100,7 @@ sed -i.lib Makefile.in -e 's|/lib$|/%{_lib}|' git commit -m "Apply Fedora specific configuration" -a cat %PATCH1 | git am cat %PATCH2 | git am +cat %PATCH3 | git am %build cd clover2 @@ -152,6 +155,9 @@ LANG=C.utf8 make -C clover2 test %{_includedir}/clover2/ %changelog +* Sat Nov 08 2025 Tom Stellard - 11.0.0-13 +- Fix build with clang >=22 + * Wed Jul 23 2025 Fedora Release Engineering - 11.0.0-12 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild