Fix compiling due to typedefs varying across platforms (#1729)

* Fix compiling on modern C++ compilers

cd9fc5d0e9 broke it

* Fix order

* Test

* Test putting flags in old order

* Remove designated initializer
This commit is contained in:
Martin 2024-12-10 21:15:43 +01:00 committed by GitHub
parent ea8ad35947
commit b8a443c728
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -140,13 +140,12 @@ void NativeThread::Initialize() {
ASSERT_MSG(posix_memalign(&sig_stack_ptr, page_size, sig_stack_size) == 0, ASSERT_MSG(posix_memalign(&sig_stack_ptr, page_size, sig_stack_size) == 0,
"Failed to allocate signal stack: {}", errno); "Failed to allocate signal stack: {}", errno);
const stack_t sig_stack = { stack_t sig_stack;
.ss_sp = sig_stack_ptr, sig_stack.ss_sp = sig_stack_ptr;
.ss_size = sig_stack_size, sig_stack.ss_size = sig_stack_size;
.ss_flags = 0, sig_stack.ss_flags = 0;
};
ASSERT_MSG(sigaltstack(&sig_stack, nullptr) == 0, "Failed to set signal stack: {}", errno); ASSERT_MSG(sigaltstack(&sig_stack, nullptr) == 0, "Failed to set signal stack: {}", errno);
#endif #endif
} }
} // namespace Core } // namespace Core