Fix 64-bit FreeBSD build
This commit is contained in:
parent
a6437f629c
commit
fff113b64f
|
@ -160,6 +160,7 @@ endif()
|
|||
if(NOT ENABLE_GENERIC)
|
||||
if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^x86" OR
|
||||
${CMAKE_SYSTEM_PROCESSOR} MATCHES "i.86" OR
|
||||
${CMAKE_SYSTEM_PROCESSOR} MATCHES "amd64" OR
|
||||
APPLE)
|
||||
if(_ARCH_64)
|
||||
set(_M_X86 1)
|
||||
|
|
|
@ -18,6 +18,9 @@
|
|||
#ifndef _M_GENERIC
|
||||
#include "Core/PowerPC/JitCommon/JitBase.h"
|
||||
#endif
|
||||
#ifdef __FreeBSD__
|
||||
#include <signal.h>
|
||||
#endif
|
||||
|
||||
namespace EMM
|
||||
{
|
||||
|
@ -256,7 +259,11 @@ static void sigsegv_handler(int sig, siginfo_t *info, void *raw_context)
|
|||
void InstallExceptionHandler()
|
||||
{
|
||||
stack_t signal_stack;
|
||||
#ifdef __FreeBSD__
|
||||
signal_stack.ss_sp = (char*)malloc(SIGSTKSZ);
|
||||
#else
|
||||
signal_stack.ss_sp = malloc(SIGSTKSZ);
|
||||
#endif
|
||||
signal_stack.ss_size = SIGSTKSZ;
|
||||
signal_stack.ss_flags = 0;
|
||||
if (sigaltstack(&signal_stack, nullptr))
|
||||
|
|
Loading…
Reference in New Issue