Fix another C compatibility issue in the configure script

Related to:

  <https://fedoraproject.org/wiki/Changes/PortingToModernC>
  <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
This commit is contained in:
Florian Weimer 2023-11-20 14:06:11 +01:00
parent 2ff159c89e
commit bd5ac20b13
2 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,20 @@
Another C compatibility issue: char ** and char * are distinct types,
and strtold expects the former for its second argument.
Submitted upstream:
<https://lists.gnu.org/archive/html/bug-bash/2023-11/msg00104.html>
diff --git a/configure.ac b/configure.ac
index 6defea0835fe8877..955c1149a8141e19 100644
--- a/configure.ac
+++ b/configure.ac
@@ -885,7 +885,7 @@ AC_CHECK_DECLS([strtold], [
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#include <stdlib.h>]],
- [[long double r; char *foo, bar; r = strtold(foo, &bar);]]
+ [[long double r; char *foo, *bar; r = strtold(foo, &bar);]]
)],
[bash_cv_strtold_broken=no],[bash_cv_strtold_broken=yes])
]

View File

@ -90,6 +90,7 @@ Patch127: bash-4.4-no-loadable-builtins.patch
# This option is undocumented in upstream and is documented by this patch
Patch128: bash-5.0-syslog-history.patch
Patch129: bash-configure-c99.patch
Patch130: bash-configure-c99-2.patch
BuildRequires: gcc
BuildRequires: texinfo bison