From e3cffa720341af4e5d7673e45ca41e91604cf8d7 Mon Sep 17 00:00:00 2001 From: Than Ngo Date: Wed, 23 Jun 2021 13:07:05 +0200 Subject: [PATCH] Resolves: #1975121, Handle SIGSTKSZ no longer being a constant --- diffutils-sigstksz.patch | 25 +++++++++++++++++++++++++ diffutils.spec | 6 +++++- 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 diffutils-sigstksz.patch diff --git a/diffutils-sigstksz.patch b/diffutils-sigstksz.patch new file mode 100644 index 0000000..a632343 --- /dev/null +++ b/diffutils-sigstksz.patch @@ -0,0 +1,25 @@ +diff -up diffutils-3.7/lib/c-stack.c.sigstksz diffutils-3.7/lib/c-stack.c +--- diffutils-3.7/lib/c-stack.c.sigstksz 2021-04-12 10:58:48.892279388 +0100 ++++ diffutils-3.7/lib/c-stack.c 2021-04-12 11:04:59.488695551 +0100 +@@ -52,12 +52,18 @@ typedef struct sigaltstack stack_t; + #endif + #ifndef SIGSTKSZ + # define SIGSTKSZ 16384 +-#elif HAVE_LIBSIGSEGV && SIGSTKSZ < 16384 ++#elif HAVE_LIBSIGSEGV + /* libsigsegv 2.6 through 2.8 have a bug where some architectures use + more than the Linux default of an 8k alternate stack when deciding + if a fault was caused by stack overflow. */ +-# undef SIGSTKSZ +-# define SIGSTKSZ 16384 ++# if defined _SC_SIGSTKSZ && _SC_SIGSTKSZ < 16384 ++ /* glibc 2.34 defines SIGSTKSZ to sysconf (_SC_SIGSTKSZ) */ ++# undef SIGSTKSZ ++# define SIGSTKSZ 16384 ++# elif SIGSTKSZ < 16384 ++# undef SIGSTKSZ ++# define SIGSTKSZ 16384 ++# endif + #endif + + #include diff --git a/diffutils.spec b/diffutils.spec index bd872b3..52edfb5 100644 --- a/diffutils.spec +++ b/diffutils.spec @@ -1,7 +1,7 @@ Summary: GNU collection of diff utilities Name: diffutils Version: 3.7 -Release: 10%{?dist} +Release: 11%{?dist} URL: https://www.gnu.org/software/diffutils/diffutils.html Source: https://ftp.gnu.org/gnu/diffutils/diffutils-%{version}.tar.xz Patch1: diffutils-cmp-s-empty.patch @@ -9,6 +9,7 @@ Patch2: diffutils-i18n.patch Patch3: diffutils-fix-gnulib-tests.patch Patch4: diffutils-3.7-coverity.patch Patch5: diffutils-3.7-false-positive.patch +Patch6: diffutils-sigstksz.patch License: GPLv3+ Provides: bundled(gnulib) BuildRequires: gcc @@ -59,6 +60,9 @@ make check %{_infodir}/diffutils.info* %changelog +* Wed Jun 23 2021 Than Ngo - 3.7-11 +- Resolves: #1975121, Handle SIGSTKSZ no longer being a constant. + * Thu Apr 15 2021 Mohan Boddu - 3.7-10 - Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937