Fix C99 compatibility issue on configure script

Related to:

  <https://fedoraproject.org/wiki/Changes/PortingToModernC>
  <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
This commit is contained in:
Florian Weimer 2023-02-06 09:56:37 +01:00
parent 94176b93c5
commit 08f64cbc4e
2 changed files with 26 additions and 1 deletions

21
bash-configure-c99.patch Normal file
View File

@ -0,0 +1,21 @@
Avoid an implicit declaration of dup2 in its configure probe. This
prevents build issues with future compilers.
Already reported upstream:
<https://lists.gnu.org/archive/html/bug-bash/2023-02/msg00000.html>
diff --git a/aclocal.m4 b/aclocal.m4
index 6162f6eb9ef90754..5cbbe96d7158197a 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -238,6 +238,9 @@ AC_CACHE_VAL(bash_cv_dup2_broken,
#include <sys/types.h>
#include <fcntl.h>
#include <stdlib.h>
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif /* HAVE_UNISTD_H */
int
main()
{

View File

@ -6,7 +6,7 @@
Version: %{baseversion}.%{patchlevel}
Name: bash
Summary: The GNU Bourne Again shell
Release: 2%{?dist}
Release: 3%{?dist}
License: GPLv3+
Url: https://www.gnu.org/software/bash
Source0: https://ftp.gnu.org/gnu/bash/bash-%{baseversion}.tar.gz
@ -86,6 +86,7 @@ Patch127: bash-4.4-no-loadable-builtins.patch
# 2020528 - Add a runtime option to enable history logging to syslog
# This option is undocumented in upstream and is documented by this patch
Patch128: bash-5.0-syslog-history.patch
Patch129: bash-configure-c99.patch
BuildRequires: gcc
BuildRequires: texinfo bison
@ -318,6 +319,9 @@ end
%{_libdir}/pkgconfig/%{name}.pc
%changelog
* Mon Feb 06 2023 Florian Weimer <fweimer@redhat.com> - 5.2.15-3
- Fix C99 compatibility issue on configure script
* Wed Jan 18 2023 Fedora Release Engineering <releng@fedoraproject.org> - 5.2.15-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild