mirror of
https://github.com/openwrt/packages.git
synced 2025-12-21 17:04:32 +04:00
zsh: fix compilation with GCC14
Upstream backport and local patch. Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=zsh
|
||||
PKG_VERSION:=5.9
|
||||
PKG_RELEASE:=2
|
||||
PKG_RELEASE:=3
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
|
||||
PKG_SOURCE_URL:=@SF/zsh
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
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
|
||||
|
||||
---
|
||||
configure.ac | 12 ++++++------
|
||||
1 file changed, 6 insertions(+), 6 deletions(-)
|
||||
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -1766,27 +1766,27 @@ if test x$zsh_cv_path_term_header != xno
|
||||
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
|
||||
11
utils/zsh/patches/010-gcc14.patch
Normal file
11
utils/zsh/patches/010-gcc14.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- a/Src/Modules/pcre.c
|
||||
+++ b/Src/Modules/pcre.c
|
||||
@@ -152,7 +152,7 @@ zpcre_get_substrings(pcre2_code *pat, ch
|
||||
int nelem = captured_count - 1;
|
||||
/* Set to the offsets of the complete match */
|
||||
if (want_offset_pair) {
|
||||
- sprintf(offset_all, "%ld %ld", ovec[0], ovec[1]);
|
||||
+ sprintf(offset_all, "%zd %zd", ovec[0], ovec[1]);
|
||||
setsparam("ZPCRE_OP", ztrdup(offset_all));
|
||||
}
|
||||
/*
|
||||
Reference in New Issue
Block a user