From ee092501d2ed9c5c6ceeebd60160c66646ae7f4c Mon Sep 17 00:00:00 2001 From: "Ralf S. Engelschall" Date: Sat, 1 Jan 2022 12:14:52 +0100 Subject: [PATCH] improve portability --- bash/bash.patch | 52 +++++++++++++++++++++++++++++++++++++++++++++++++ bash/bash.spec | 4 ++-- 2 files changed, 54 insertions(+), 2 deletions(-) diff --git a/bash/bash.patch b/bash/bash.patch index 8c15a5fdba..f44a0847f3 100644 --- a/bash/bash.patch +++ b/bash/bash.patch @@ -90,3 +90,55 @@ Index: externs.h /* Functions from expr.c. */ #define EXP_EXPANDED 0x01 +----------------------------------------------------------------------------- + +Fix building with disabled NLS. + +Index: locale.c +--- locale.c.orig 2020-02-24 21:08:43.000000000 +0100 ++++ locale.c 2022-01-01 12:13:02.457102000 +0100 +@@ -91,7 +91,7 @@ + #if defined (HANDLE_MULTIBYTE) + locale_shiftstates = mblen ((char *)NULL, 0); + #else +- local_shiftstates = 0; ++ locale_shiftstates = 0; + #endif + } + +@@ -117,7 +117,7 @@ + # if defined (HANDLE_MULTIBYTE) + locale_shiftstates = mblen ((char *)NULL, 0); + # else +- local_shiftstates = 0; ++ locale_shiftstates = 0; + # endif + + u32reset (); +@@ -226,7 +226,7 @@ + # if defined (HANDLE_MULTIBYTE) + locale_shiftstates = mblen ((char *)NULL, 0); + # else +- local_shiftstates = 0; ++ locale_shiftstates = 0; + # endif + u32reset (); + return r; +@@ -250,7 +250,7 @@ + #if defined (HANDLE_MULTIBYTE) + locale_shiftstates = mblen ((char *)NULL, 0); + #else +- local_shiftstates = 0; ++ locale_shiftstates = 0; + #endif + u32reset (); + } +@@ -391,7 +391,7 @@ + # if defined (HANDLE_MULTIBYTE) + locale_shiftstates = mblen ((char *)NULL, 0); + # else +- local_shiftstates = 0; ++ locale_shiftstates = 0; + # endif + u32reset (); + #endif diff --git a/bash/bash.spec b/bash/bash.spec index fca6a04678..5968f8a41e 100644 --- a/bash/bash.spec +++ b/bash/bash.spec @@ -38,7 +38,7 @@ Class: CORE Group: Shell License: GPL Version: %{V_base_real}.%{V_plvl_raw} -Release: 20211119 +Release: 20220101 # package options %option with_multibyte yes @@ -151,7 +151,7 @@ PreReq: libiconv, readline::with_multibyte = yes echo "ac_cv_lib_intl_bindtextdomain=no" ) >config.cache CC="%{l_cc}" \ - CFLAGS="%{l_cflags -O}" \ + CFLAGS="%{l_cflags -O} -Wno-discarded-qualifiers" \ GREP="grep" \ ./configure \ --cache-file=./config.cache \