Commit 0839ea10 authored by Alexandre Julliard's avatar Alexandre Julliard

ntdll: Added sysctl to make the signal stack per-thread on MacOS.

parent db7b684d
......@@ -51,6 +51,9 @@
#ifdef HAVE_SYS_SIGNAL_H
# include <sys/signal.h>
#endif
#ifdef HAVE_SYS_SYSCTL_H
# include <sys/sysctl.h>
#endif
#include "windef.h"
#include "thread.h"
......@@ -1301,6 +1304,15 @@ BOOL SIGNAL_Init(void)
#ifdef HAVE_SIGALTSTACK
struct sigaltstack ss;
#ifdef __APPLE__
int mib[2], val = 1;
mib[0] = CTL_KERN;
mib[1] = KERN_THALTSTACK;
sysctl( mib, 2, NULL, NULL, &val, sizeof(val) );
#endif
ss.ss_sp = get_signal_stack();
ss.ss_size = signal_stack_size;
ss.ss_flags = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment