From 7f527155d4f905e01d1374ebc00f29783e44fae33d34e9ddde831969e5b848c5 Mon Sep 17 00:00:00 2001
From: Jan Engelhardt <jengelh@inai.de>
Date: Sun, 15 Aug 2021 17:25:49 +0000
Subject: [PATCH] - Add schily-stksz.diff

OBS-URL: https://build.opensuse.org/package/show/utilities/schily?expand=0&rev=134
---
 schily-stksz.diff | 23 +++++++++++++++++++++++
 schily.changes    |  1 +
 schily.spec       |  1 +
 3 files changed, 25 insertions(+)
 create mode 100644 schily-stksz.diff

diff --git a/schily-stksz.diff b/schily-stksz.diff
new file mode 100644
index 0000000..3868599
--- /dev/null
+++ b/schily-stksz.diff
@@ -0,0 +1,23 @@
+From: Jan Engelhardt <jengelh@inai.de>
+Date: 2021-08-15 18:31:19.413482687 +0200
+
+Due to VLA support in gcc, the sigsegv_stack test variable needs to be outside
+of a function for the test not to generate a false positive.
+---
+ autoconf/configure |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+Index: schily-2021-08-14/autoconf/configure
+===================================================================
+--- schily-2021-08-14.orig/autoconf/configure
++++ schily-2021-08-14/autoconf/configure
+@@ -6662,8 +6662,8 @@ else
+ #line 6663 "configure"
+ #include "confdefs.h"
+ #include <signal.h>
+-int main() {
+ char sigsegv_stack[SIGSTKSZ];
++int main() {
+ ; return 0; }
+ EOF
+ if { { eval echo configure:6670: \"$ac_compile\" ;} 1>&5; { eval $ac_compile ;} 2>&5; }; then
diff --git a/schily.changes b/schily.changes
index 6e1ff02..7f19ccb 100644
--- a/schily.changes
+++ b/schily.changes
@@ -8,6 +8,7 @@ Sun Aug 15 16:01:01 UTC 2021 - Jan Engelhardt <jengelh@inai.de>
     rather leaves $$ untouched.
   * smake: The dynamic macros $? and $^ now work for implicit rules
     as well.
+- Add schily-stksz.diff
 
 -------------------------------------------------------------------
 Sat Jul 31 14:04:05 UTC 2021 - Jan Engelhardt <jengelh@inai.de>
diff --git a/schily.spec b/schily.spec
index 6e8af19..52485b6 100644
--- a/schily.spec
+++ b/schily.spec
@@ -41,6 +41,7 @@ Source1:        README-FIRST
 # and submit patches upstream FIRST (cc to the bspkg maintainer perhaps).
 Patch1:         iconv-name.diff
 Patch2:         schily-2018-05-25_star_configuration.patch
+Patch3:         schily-stksz.diff
 BuildRequires:  autoconf
 BuildRequires:  fdupes
 BuildRequires:  gcc-c++