From 149717a4339a60c8d68cc490459981bd3ed7f8e9 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 13 Feb 2026 12:19:20 +0100 Subject: add upstream patch fixing build with GCC 16 --- build.patch | 28 ++++++++++++++++++++++++++++ vips.spec | 8 +++++++- 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 build.patch diff --git a/build.patch b/build.patch new file mode 100644 index 0000000..561a9e1 --- /dev/null +++ b/build.patch @@ -0,0 +1,28 @@ +From abb4dfad9e446e77396de9e93003af5be7aa18da Mon Sep 17 00:00:00 2001 +From: Kleis Auke Wolthuizen +Date: Sun, 18 Jan 2026 12:15:33 +0100 +Subject: [PATCH] memory: fix `VIPS_FREEF` for expression-like macros (#4836) + +Ensure the macro works correctly when F expands to an expression, +such as `g_free()` using `free_sized()` (as available in the +upcoming glibc 2.43). + +Resolves: #4835. +--- + ChangeLog | 1 + + libvips/include/vips/memory.h | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) + +diff --git a/libvips/include/vips/memory.h b/libvips/include/vips/memory.h +index 93e669340b..7073d1ea6a 100644 +--- a/libvips/include/vips/memory.h ++++ b/libvips/include/vips/memory.h +@@ -41,7 +41,7 @@ extern "C" { + G_STMT_START \ + { \ + if (S) { \ +- (void) F((S)); \ ++ (void) (F((S))); \ + (S) = 0; \ + } \ + } \ diff --git a/vips.spec b/vips.spec index 600333e..7102450 100644 --- a/vips.spec +++ b/vips.spec @@ -65,13 +65,15 @@ Name: vips Version: %{vips_version}%{?vips_prever:~%{vips_prever}} -Release: 1%{?dist} +Release: 2%{?dist} Summary: C/C++ library for processing large images License: LGPL-2.1-or-later URL: https://www.libvips.org/ Source0: https://github.com/libvips/libvips/releases/download/v%{vips_tagver}/vips-%{vips_tagver}.tar.xz +Patch0: build.patch + BuildRequires: gcc BuildRequires: gcc-c++ # see https://github.com/libvips/libvips/issues/4558 @@ -316,6 +318,7 @@ exit 1 %endif %setup -q -n vips-%{vips_version} +%patch -P0 -p1 cat << 'EOF' | tee DOC_README @@ -492,6 +495,9 @@ export CXXFLAGS="%{optflags} -ftree-vectorize" %changelog +* Fri Feb 13 2026 Remi Collet - 8.18.0-2 +- add upstream patch fixing build with GCC 16 + * Wed Dec 17 2025 Remi Collet - 8.18.0-1 - update to 8.18.0 -- cgit