diff --git a/Common/ExceptionHandlerSetup.cpp b/Common/ExceptionHandlerSetup.cpp index e8ca92b0a9..0f541333a7 100644 --- a/Common/ExceptionHandlerSetup.cpp +++ b/Common/ExceptionHandlerSetup.cpp @@ -21,10 +21,6 @@ #include "Common/MachineContext.h" -#ifndef _WIN32 -#include // Needed for _POSIX_VERSION -#endif - static BadAccessHandler g_badAccessHandler; #ifdef MACHINE_CONTEXT_SUPPORTED @@ -225,7 +221,7 @@ void InstallExceptionHandler(BadAccessHandler badAccessHandler) { void UninstallExceptionHandler() { } -#elif defined(_POSIX_VERSION) +#else static struct sigaction old_sa_segv; static struct sigaction old_sa_bus; @@ -330,10 +326,6 @@ void UninstallExceptionHandler() { g_badAccessHandler = nullptr; } -#else // Unsupported platform. Could also #error - -#error Shouldn't get here - #endif #else // !MACHINE_CONTEXT_SUPPORTED diff --git a/Common/MachineContext.h b/Common/MachineContext.h index e2cf802888..dabc854003 100644 --- a/Common/MachineContext.h +++ b/Common/MachineContext.h @@ -315,6 +315,7 @@ typedef mcontext_t SContext; #if PPSSPP_ARCH(AMD64) #include +#include #define CTX_PC CTX_RIP static inline uint64_t *ContextRN(SContext* ctx, int n) { static const uint8_t offsets[] = { @@ -330,6 +331,7 @@ static inline uint64_t *ContextRN(SContext* ctx, int n) { #elif PPSSPP_ARCH(X86) #include +#include #define CTX_PC CTX_RIP static inline uint32_t *ContextRN(SContext* ctx, int n) {