Fix build on Mac OS

This commit is contained in:
Alexey Milovidov 2020-10-26 07:42:22 +03:00
parent 068235c2d7
commit 88e846b36d

View File

@ -53,7 +53,11 @@ ThreadStatus::ThreadStatus()
has_alt_stack = true;
/// We have to call 'sigaltstack' before first 'sigaction'. (It does not work other way, for unknown reason).
stack_t altstack_description{ .ss_sp = alt_stack, .ss_flags = 0, .ss_size = sizeof(alt_stack) };
stack_t altstack_description{};
altstack_description.ss_sp = alt_stack;
altstack_description.ss_flags = 0;
altstack_description.ss_size = sizeof(alt_stack);
if (0 != sigaltstack(&altstack_description, nullptr))
{
LOG_WARNING(log, "Cannot set alternative signal stack for thread, {}", errnoToString(errno));