mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-21 05:09:46 -06:00
Add NetBSD support (#985)
Note - This will require PaX MPROTECT to be disabled for melonDS by running: paxctl +m melonDS
This commit is contained in:
@ -159,6 +159,8 @@ static void SigsegvHandler(int sig, siginfo_t* info, void* rawContext)
|
||||
desc.FaultPC = (u8*)context->uc_mcontext->__ss.__rip;
|
||||
#elif defined(__FreeBSD__)
|
||||
desc.FaultPC = (u8*)context->uc_mcontext.mc_rip;
|
||||
#elif defined(__NetBSD__)
|
||||
desc.FaultPC = (u8*)context->uc_mcontext.__gregs[_REG_RIP];
|
||||
#else
|
||||
desc.FaultPC = (u8*)context->uc_mcontext.gregs[REG_RIP];
|
||||
#endif
|
||||
@ -180,6 +182,8 @@ static void SigsegvHandler(int sig, siginfo_t* info, void* rawContext)
|
||||
context->uc_mcontext->__ss.__rip = (u64)desc.FaultPC;
|
||||
#elif defined(__FreeBSD__)
|
||||
context->uc_mcontext.mc_rip = (u64)desc.FaultPC;
|
||||
#elif defined(__NetBSD__)
|
||||
context->uc_mcontext.__gregs[_REG_RIP] = (u64)desc.FaultPC;
|
||||
#else
|
||||
context->uc_mcontext.gregs[REG_RIP] = (u64)desc.FaultPC;
|
||||
#endif
|
||||
|
@ -92,7 +92,10 @@ endif()
|
||||
|
||||
if (UNIX)
|
||||
option(PORTABLE "Make a portable build that looks for its configuration in the current directory" OFF)
|
||||
target_link_libraries(melonDS dl Qt5::Core Qt5::Gui Qt5::Widgets)
|
||||
target_link_libraries(melonDS Qt5::Core Qt5::Gui Qt5::Widgets)
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
target_link_libraries(melonDS dl)
|
||||
endif()
|
||||
elseif (WIN32)
|
||||
option(PORTABLE "Make a portable build that looks for its configuration in the current directory" ON)
|
||||
configure_file("${CMAKE_SOURCE_DIR}/melon.rc.in" "${CMAKE_SOURCE_DIR}/melon.rc")
|
||||
|
Reference in New Issue
Block a user