VulkanRenderer: Fix compile error on glibc 2.43

sa_handler may not be a direct member of struct sigaction, in glibc 2.43
it may be defined as part of a union of sa_handler and sa_sigaction,
then a preprocessor macro is defined for compatibility purposes.
Here it expands as `sa{.__sigaction_handler.sa_handler = ...}` which
is not supported in C++.

/home/sapphire/code/Cemu/src/Cafe/HW/Latte/Renderer/Vulkan/VulkanRenderer.cpp: In function ‘int BreathOfTheWildChildProcessMain()’:
/home/sapphire/code/Cemu/src/Cafe/HW/Latte/Renderer/Vulkan/VulkanRenderer.cpp:346:29: error: expected primary-expression before ‘.’ token
  346 |         struct sigaction sa{.sa_handler = [](int unused){_exit(1);}};
      |                             ^
This commit is contained in:
Sapphire 2026-04-11 21:44:01 -05:00
parent 391478b307
commit b1b0369848
No known key found for this signature in database
GPG Key ID: 642911AA4025C8CC

View File

@ -343,7 +343,9 @@ void VulkanRenderer::GetDeviceFeatures()
int BreathOfTheWildChildProcessMain()
{
InitializeGlobalVulkan();
struct sigaction sa{.sa_handler = [](int unused){_exit(1);}};
struct sigaction sa{};
sa.sa_handler = [](int unused) { _exit(1); };
int ret = sigaction(SIGABRT, &sa, nullptr);
freopen("/dev/null", "w", stderr);