diff --git a/0001-configure-Fix-initialization-from-incompatible-point.patch b/0001-configure-Fix-initialization-from-incompatible-point.patch new file mode 100644 index 0000000..bc4aa1e --- /dev/null +++ b/0001-configure-Fix-initialization-from-incompatible-point.patch @@ -0,0 +1,43 @@ +From 32a9ee6650654469cd591a3ae26842c54f898392 Mon Sep 17 00:00:00 2001 +From: "Richard W.M. Jones" +Date: Mon, 4 Dec 2023 10:23:29 +0000 +Subject: [PATCH] configure: Fix initialization from incompatible pointer type + +With GCC 14: + + configure:20816: checking if environ is declared in header files + configure:20833: gcc -c -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grec +ord-gcc-switches -pipe -Wall -Werror=format-security +-Werror=implicit-function-declaration -Werror=implicit-int +-Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS +-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong +-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic +-fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection +-fno-omit-frame-pointer -mno-omit-leaf-frame-pointer conftest.c >&5 + conftest.c: In function 'test': + conftest.c:62:22: error: initialization of 'const char **' from incompatible p +ointer type 'char **' + 62 | const char **env = environ; + | ^~~~~~~ + +Thanks: Florian Weimer +--- + configure.ac | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 602cdc5cb..e7d58dcc8 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -336,7 +336,7 @@ AC_LANG_SOURCE([[ + static int + test (void) + { +- const char **env = environ; ++ char **env = environ; + return env ? 1 : 0; // this just forces env to be used + } + ]]) +-- +2.43.0 + diff --git a/nbdkit.spec b/nbdkit.spec index feb6fec..4ffb66a 100644 --- a/nbdkit.spec +++ b/nbdkit.spec @@ -54,14 +54,14 @@ ExclusiveArch: x86_64 %global verify_tarball_signature 1 # If there are patches which touch autotools files, set this to 1. -%global patches_touch_autotools %{nil} +%global patches_touch_autotools 1 # The source directory. %global source_directory 1.37-development Name: nbdkit Version: 1.37.3 -Release: 1%{?dist} +Release: 2%{?dist} Summary: NBD server License: BSD-3-Clause @@ -92,6 +92,9 @@ Source6: %{modulename}.te Source7: %{modulename}.if Source8: %{modulename}.fc +# Upstream fix for GCC 14 +Patch: 0001-configure-Fix-initialization-from-incompatible-point.patch + BuildRequires: make %if 0%{patches_touch_autotools} BuildRequires: autoconf, automake, libtool @@ -1326,6 +1329,9 @@ fi %changelog +* Mon Dec 04 2023 Richard W.M. Jones - 1.37.3-2 +- Add upstream fix for GCC 14 + * Sun Nov 26 2023 Richard W.M. Jones - 1.37.3-1 - New upstream development version 1.37.3