Fix signal_stack_size for glibc 2.34

`SIGSTKSZ` is now defined as `sysconf(_SC_SIGSTKSZ)` which is not constexpr, and returns a long which throws off the `std::max` template deduction.
This commit is contained in:
Marshall Mohror 2021-09-20 22:28:48 -05:00 committed by merry
parent 6ce8bfaf32
commit 0b8fd755d8

View file

@ -64,7 +64,7 @@ private:
SigHandler sig_handler;
SigHandler::SigHandler() {
constexpr size_t signal_stack_size = std::max(SIGSTKSZ, 2 * 1024 * 1024);
const size_t signal_stack_size = std::max<size_t>(SIGSTKSZ, 2 * 1024 * 1024);
signal_stack_memory = std::malloc(signal_stack_size);