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.

Signed-off-by: Enrico Belleri <idesmi@protonmail.com>
This commit is contained in:
Marshall Mohror 2021-09-20 22:28:48 -05:00 committed by Enrico Belleri
parent 71e3553d78
commit b0200a0485

View File

@ -60,7 +60,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);
stack_t signal_stack;
signal_stack.ss_sp = std::malloc(signal_stack_size);