From b8a443c728c50c778ea29eca94747f9321e8949b Mon Sep 17 00:00:00 2001 From: Martin Date: Tue, 10 Dec 2024 21:15:43 +0100 Subject: [PATCH] Fix compiling due to typedefs varying across platforms (#1729) * Fix compiling on modern C++ compilers https://github.com/shadps4-emu/shadPS4/commit/cd9fc5d0e935ac12f469d609b1a643964fb33129 broke it * Fix order * Test * Test putting flags in old order * Remove designated initializer --- src/core/thread.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/core/thread.cpp b/src/core/thread.cpp index 0d0804ce..07681e6b 100644 --- a/src/core/thread.cpp +++ b/src/core/thread.cpp @@ -140,13 +140,12 @@ void NativeThread::Initialize() { ASSERT_MSG(posix_memalign(&sig_stack_ptr, page_size, sig_stack_size) == 0, "Failed to allocate signal stack: {}", errno); - const stack_t sig_stack = { - .ss_sp = sig_stack_ptr, - .ss_size = sig_stack_size, - .ss_flags = 0, - }; + stack_t sig_stack; + sig_stack.ss_sp = sig_stack_ptr; + sig_stack.ss_size = sig_stack_size; + sig_stack.ss_flags = 0; ASSERT_MSG(sigaltstack(&sig_stack, nullptr) == 0, "Failed to set signal stack: {}", errno); #endif } -} // namespace Core \ No newline at end of file +} // namespace Core