Blame SOURCES/diffutils-sigstksz.patch

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