diff options
Diffstat (limited to 'dev-libs/leatherman/files/leatherman-1.12.6-SIGSTKSZ.patch')
-rw-r--r-- | dev-libs/leatherman/files/leatherman-1.12.6-SIGSTKSZ.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/dev-libs/leatherman/files/leatherman-1.12.6-SIGSTKSZ.patch b/dev-libs/leatherman/files/leatherman-1.12.6-SIGSTKSZ.patch new file mode 100644 index 000000000000..e6c7349e814b --- /dev/null +++ b/dev-libs/leatherman/files/leatherman-1.12.6-SIGSTKSZ.patch @@ -0,0 +1,45 @@ +diff -Naur a/src/Catch-1.10.0/single_include/catch.hpp b/src/Catch-1.10.0/single_include/catch.hpp +--- a/src/Catch-1.10.0/single_include/catch.hpp 2021-07-05 07:30:43.000000000 -0500 ++++ b/src/Catch-1.10.0/single_include/catch.hpp 2021-12-17 01:34:41.000000000 -0600 +@@ -6447,6 +6447,14 @@ + + # else // CATCH_CONFIG_POSIX_SIGNALS is defined + ++# if defined(_SC_SIGSTKSZ_SOURCE) || defined(_GNU_SOURCE) ++// on glibc > 2.33 this is no longer constant, see ++// https://sourceware.org/git/?p=glibc.git;a=blob;f=NEWS;h=85e84fe53699fe9e392edffa993612ce08b2954a;hb=HEAD ++static constexpr std::size_t sigStackSize = 32768; ++# else ++static constexpr std::size_t sigStackSize = 32768 >= MINSIGSTKSZ ? 32768 : MINSIGSTKSZ; ++# endif ++ + #include <signal.h> + + namespace Catch { +@@ -6470,7 +6478,7 @@ + static bool isSet; + static struct sigaction oldSigActions [sizeof(signalDefs)/sizeof(SignalDefs)]; + static stack_t oldSigStack; +- static char altStackMem[SIGSTKSZ]; ++ static char altStackMem[sigStackSize]; + + static void handleSignal( int sig ) { + std::string name = "<unknown signal>"; +@@ -6490,7 +6498,7 @@ + isSet = true; + stack_t sigStack; + sigStack.ss_sp = altStackMem; +- sigStack.ss_size = SIGSTKSZ; ++ sigStack.ss_size = sigStackSize; + sigStack.ss_flags = 0; + sigaltstack(&sigStack, &oldSigStack); + struct sigaction sa = { 0 }; +@@ -6521,7 +6529,7 @@ + bool FatalConditionHandler::isSet = false; + struct sigaction FatalConditionHandler::oldSigActions[sizeof(signalDefs)/sizeof(SignalDefs)] = {}; + stack_t FatalConditionHandler::oldSigStack = {}; +- char FatalConditionHandler::altStackMem[SIGSTKSZ] = {}; ++ char FatalConditionHandler::altStackMem[sigStackSize] = {}; + + } // namespace Catch + |