Add upstream fix for GCC 14
This commit is contained in:
parent
0150826388
commit
6debad82d3
@ -0,0 +1,43 @@
|
|||||||
|
From 32a9ee6650654469cd591a3ae26842c54f898392 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||||||
|
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
|
||||||
|
|
10
nbdkit.spec
10
nbdkit.spec
@ -54,14 +54,14 @@ ExclusiveArch: x86_64
|
|||||||
%global verify_tarball_signature 1
|
%global verify_tarball_signature 1
|
||||||
|
|
||||||
# If there are patches which touch autotools files, set this to 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.
|
# The source directory.
|
||||||
%global source_directory 1.37-development
|
%global source_directory 1.37-development
|
||||||
|
|
||||||
Name: nbdkit
|
Name: nbdkit
|
||||||
Version: 1.37.3
|
Version: 1.37.3
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: NBD server
|
Summary: NBD server
|
||||||
|
|
||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
@ -92,6 +92,9 @@ Source6: %{modulename}.te
|
|||||||
Source7: %{modulename}.if
|
Source7: %{modulename}.if
|
||||||
Source8: %{modulename}.fc
|
Source8: %{modulename}.fc
|
||||||
|
|
||||||
|
# Upstream fix for GCC 14
|
||||||
|
Patch: 0001-configure-Fix-initialization-from-incompatible-point.patch
|
||||||
|
|
||||||
BuildRequires: make
|
BuildRequires: make
|
||||||
%if 0%{patches_touch_autotools}
|
%if 0%{patches_touch_autotools}
|
||||||
BuildRequires: autoconf, automake, libtool
|
BuildRequires: autoconf, automake, libtool
|
||||||
@ -1326,6 +1329,9 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Dec 04 2023 Richard W.M. Jones <rjones@redhat.com> - 1.37.3-2
|
||||||
|
- Add upstream fix for GCC 14
|
||||||
|
|
||||||
* Sun Nov 26 2023 Richard W.M. Jones <rjones@redhat.com> - 1.37.3-1
|
* Sun Nov 26 2023 Richard W.M. Jones <rjones@redhat.com> - 1.37.3-1
|
||||||
- New upstream development version 1.37.3
|
- New upstream development version 1.37.3
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user