mirror of https://github.com/golang/go.git
[release-branch.go1.9] runtime: use MAP_ANON in sigstack check
MAP_ANON is the deprecated but more portable spelling of MAP_ANONYMOUS. Use MAP_ANON to un-break the Darwin 10.10 builder. Updates #22930. Change-Id: Iedd6232b94390b3b2a7423c45cdcb25c1a5b3323 Reviewed-on: https://go-review.googlesource.com/88316 Run-TryBot: Andrew Bonventre <andybons@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
parent
f4870b7758
commit
75c7c40d29
|
|
@ -25,7 +25,7 @@ extern void SigStackCallback();
|
|||
|
||||
static void* WithSigStack(void* arg __attribute__((unused))) {
|
||||
// Set up an alternate system stack.
|
||||
void* base = mmap(0, SIGSTKSZ, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0);
|
||||
void* base = mmap(0, SIGSTKSZ, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANON|MAP_STACK, -1, 0);
|
||||
if (base == MAP_FAILED) {
|
||||
perror("mmap failed");
|
||||
abort();
|
||||
|
|
|
|||
Loading…
Reference in New Issue