mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-14 08:00:50 +02:00
Noticed recently that `FEXServer -w` was broken and couldn't understand why. Turns out that FHU syscall handling was /always/ falling down the `#else` path in the handlers since cmake `add_definitions` follows folder scoping rules. This means it was always returning -1, which was causing FEXServer's pidfd_open usage to always receive -1, which meant the sendmsg with FD was always failing, which meant the `FEXServer -w` would forever wait for a message that was never sent. Converting the utility over to a target not only fixes definition scoping problems, but also makes the other paths actually work. This found some compiling bugs and instead lets us define SYS_pidfd_open if it doesn't exist. Letting the kernel return the ENOSYS if it doesn't exist on that platform. Main thing, fixes FEXServer -w hanging forever.
14 lines
435 B
CMake
14 lines
435 B
CMake
set(NAME Common)
|
|
set(SRCS
|
|
ArgumentLoader.cpp
|
|
Config.cpp
|
|
EnvironmentLoader.cpp
|
|
FEXServerClient.cpp
|
|
FileFormatCheck.cpp
|
|
StringUtil.cpp)
|
|
|
|
add_library(${NAME} STATIC ${SRCS})
|
|
target_link_libraries(${NAME} FEXCore_Base cpp-optparse json-maker FEXHeaderUtils)
|
|
target_include_directories(${NAME} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/External/cpp-optparse/)
|
|
target_include_directories(${NAME} PRIVATE ${CMAKE_BINARY_DIR}/generated)
|