Blame SOURCES/diffutils-sigstksz.patch

4a2376
diff -up diffutils-3.7/lib/c-stack.c.sigstksz diffutils-3.7/lib/c-stack.c
4a2376
--- diffutils-3.7/lib/c-stack.c.sigstksz	2021-04-12 10:58:48.892279388 +0100
4a2376
+++ diffutils-3.7/lib/c-stack.c	2021-04-12 11:04:59.488695551 +0100
4a2376
@@ -52,12 +52,18 @@ typedef struct sigaltstack stack_t;
4a2376
 #endif
4a2376
 #ifndef SIGSTKSZ
4a2376
 # define SIGSTKSZ 16384
4a2376
-#elif HAVE_LIBSIGSEGV && SIGSTKSZ < 16384
4a2376
+#elif HAVE_LIBSIGSEGV
4a2376
 /* libsigsegv 2.6 through 2.8 have a bug where some architectures use
4a2376
    more than the Linux default of an 8k alternate stack when deciding
4a2376
    if a fault was caused by stack overflow.  */
4a2376
-# undef SIGSTKSZ
4a2376
-# define SIGSTKSZ 16384
4a2376
+# if defined _SC_SIGSTKSZ && _SC_SIGSTKSZ < 16384
4a2376
+   /* glibc 2.34 defines SIGSTKSZ to sysconf (_SC_SIGSTKSZ) */
4a2376
+#  undef SIGSTKSZ
4a2376
+#  define SIGSTKSZ 16384
4a2376
+# elif SIGSTKSZ < 16384
4a2376
+#  undef SIGSTKSZ
4a2376
+#  define SIGSTKSZ 16384
4a2376
+# endif
4a2376
 #endif
4a2376
 
4a2376
 #include <stdlib.h>