Andrew Geissler | 595f630 | 2022-01-24 19:11:47 +0000 | [diff] [blame^] | 1 | From fae154eb209e068586e1adb589de5d273fcf4b4f Mon Sep 17 00:00:00 2001 |
| 2 | From: Denis Arnaud <denis.arnaud_fedora@m4x.org> |
| 3 | Date: Tue, 18 May 2021 00:05:03 +0200 |
| 4 | Subject: [PATCH] Fix build when SIGSTKSZ is no longer a constant |
| 5 | |
| 6 | In the latest glibc versions SIGSTKSZ is not a constant any more, which |
| 7 | broke building the tests with it. |
| 8 | |
| 9 | Work around this by hard-coding a typical value for it. |
| 10 | |
| 11 | closes #886. |
| 12 | |
| 13 | Upstream-Status: Backport. |
| 14 | --- |
| 15 | tests/catch.hpp | 4 ++-- |
| 16 | 1 file changed, 2 insertions(+), 2 deletions(-) |
| 17 | |
| 18 | diff --git a/tests/catch.hpp b/tests/catch.hpp |
| 19 | index 014df2c5..85067813 100644 |
| 20 | --- a/tests/catch.hpp |
| 21 | +++ b/tests/catch.hpp |
| 22 | @@ -6489,7 +6489,7 @@ namespace Catch { |
| 23 | static bool isSet; |
| 24 | static struct sigaction oldSigActions [sizeof(signalDefs)/sizeof(SignalDefs)]; |
| 25 | static stack_t oldSigStack; |
| 26 | - static char altStackMem[SIGSTKSZ]; |
| 27 | + static char altStackMem[8192]; |
| 28 | |
| 29 | static void handleSignal( int sig ) { |
| 30 | std::string name = "<unknown signal>"; |
| 31 | @@ -6540,7 +6540,7 @@ namespace Catch { |
| 32 | bool FatalConditionHandler::isSet = false; |
| 33 | struct sigaction FatalConditionHandler::oldSigActions[sizeof(signalDefs)/sizeof(SignalDefs)] = {}; |
| 34 | stack_t FatalConditionHandler::oldSigStack = {}; |
| 35 | - char FatalConditionHandler::altStackMem[SIGSTKSZ] = {}; |
| 36 | + char FatalConditionHandler::altStackMem[8192] = {}; |
| 37 | |
| 38 | } // namespace Catch |
| 39 | |
| 40 | -- |
| 41 | 2.25.1 |
| 42 | |