mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-08-08 08:30:47 -09:00
package/zsh: fix build with gcc >= 14
Fix the following build failure with gcc >= 14:
termcap.c:45:14: error: conflicting types for 'boolcodes'; have 'char *[]'
45 | static char *boolcodes[] = {
| ^~~~~~~~~
In file included from ../../Src/zshterm.h:1,
from ../../Src/zsh_system.h:932,
from ../../Src/zsh.mdh:17,
from termcap.mdh:17,
from termcap.c:38:
/home/autobuild/autobuild/instance-0/output-1/host/or1k-buildroot-linux-uclibc/sysroot/usr/include/term.h:764:56: note: previous declaration of 'boolcodes' with type 'const char * const[]'
764 | extern NCURSES_EXPORT_VAR(NCURSES_CONST char * const ) boolcodes[];
| ^~~~~~~~~
Fixes:
- http://autobuild.buildroot.org/results/fe2f7170465e96cc1de3dae139a25f615331f4b9
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
committed by
Thomas Petazzoni
parent
16598146fb
commit
910e91f3b0
@@ -0,0 +1,51 @@
|
||||
From 4c89849c98172c951a9def3690e8647dae76308f Mon Sep 17 00:00:00 2001
|
||||
From: Florian Weimer <fweimer@redhat.com>
|
||||
Date: Fri, 8 Dec 2023 21:58:07 +0100
|
||||
Subject: [PATCH] 52383: Avoid incompatible pointer types in terminfo global
|
||||
variable checks
|
||||
|
||||
Upstream: https://sourceforge.net/p/zsh/code/ci/4c89849c98172c951a9def3690e8647dae76308f
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
---
|
||||
ChangeLog | 3 +++
|
||||
configure.ac | 12 ++++++------
|
||||
2 files changed, 9 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 2a8221e1f..2871dcb7c 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1768,27 +1768,27 @@ if test x$zsh_cv_path_term_header != xnone; then
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING(if boolcodes is available)
|
||||
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = boolcodes; puts(*test);]])],[AC_DEFINE(HAVE_BOOLCODES) boolcodes=yes],[boolcodes=no])
|
||||
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)boolcodes; puts(*test);]])],[AC_DEFINE(HAVE_BOOLCODES) boolcodes=yes],[boolcodes=no])
|
||||
AC_MSG_RESULT($boolcodes)
|
||||
|
||||
AC_MSG_CHECKING(if numcodes is available)
|
||||
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = numcodes; puts(*test);]])],[AC_DEFINE(HAVE_NUMCODES) numcodes=yes],[numcodes=no])
|
||||
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)numcodes; puts(*test);]])],[AC_DEFINE(HAVE_NUMCODES) numcodes=yes],[numcodes=no])
|
||||
AC_MSG_RESULT($numcodes)
|
||||
|
||||
AC_MSG_CHECKING(if strcodes is available)
|
||||
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = strcodes; puts(*test);]])],[AC_DEFINE(HAVE_STRCODES) strcodes=yes],[strcodes=no])
|
||||
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)strcodes; puts(*test);]])],[AC_DEFINE(HAVE_STRCODES) strcodes=yes],[strcodes=no])
|
||||
AC_MSG_RESULT($strcodes)
|
||||
|
||||
AC_MSG_CHECKING(if boolnames is available)
|
||||
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = boolnames; puts(*test);]])],[AC_DEFINE(HAVE_BOOLNAMES) boolnames=yes],[boolnames=no])
|
||||
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)boolnames; puts(*test);]])],[AC_DEFINE(HAVE_BOOLNAMES) boolnames=yes],[boolnames=no])
|
||||
AC_MSG_RESULT($boolnames)
|
||||
|
||||
AC_MSG_CHECKING(if numnames is available)
|
||||
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = numnames; puts(*test);]])],[AC_DEFINE(HAVE_NUMNAMES) numnames=yes],[numnames=no])
|
||||
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)numnames; puts(*test);]])],[AC_DEFINE(HAVE_NUMNAMES) numnames=yes],[numnames=no])
|
||||
AC_MSG_RESULT($numnames)
|
||||
|
||||
AC_MSG_CHECKING(if strnames is available)
|
||||
- AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = strnames; puts(*test);]])],[AC_DEFINE(HAVE_STRNAMES) strnames=yes],[strnames=no])
|
||||
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[$term_includes]], [[char **test = (char **)strnames; puts(*test);]])],[AC_DEFINE(HAVE_STRNAMES) strnames=yes],[strnames=no])
|
||||
AC_MSG_RESULT($strnames)
|
||||
|
||||
dnl There are apparently defective terminal library headers on some
|
||||
@@ -13,6 +13,8 @@ ZSH_CONF_ENV = zsh_cv_sys_nis=no zsh_cv_sys_nis_plus=no
|
||||
ZSH_LICENSE = MIT-like
|
||||
ZSH_LICENSE_FILES = LICENCE
|
||||
ZSH_CPE_ID_VENDOR = zsh
|
||||
# 0001-52383-Avoid-incompatible-pointer-types-in-terminfo-global-variable.patch
|
||||
ZSH_AUTORECONF = YES
|
||||
|
||||
# zsh uses TRY_RUN to determine these
|
||||
ZSH_CONF_OPTS += \
|
||||
|
||||
Reference in New Issue
Block a user