]> Cypherpunks repositories - gostls13.git/commitdiff
misc/cgo/test: fix test on darwin/386 with cgo enabled
authorRuss Cox <rsc@golang.org>
Sun, 24 Jan 2016 16:02:19 +0000 (11:02 -0500)
committerRuss Cox <rsc@golang.org>
Sun, 24 Jan 2016 20:21:29 +0000 (20:21 +0000)
Apparently the darwin/386 builder does not enable cgo.
This failure turned up running

GOARCH=386 GOHOSTARCH=386 ./all.bash

on my Mac.

Change-Id: Ia2487c4fd85d4b0f9f564880f22d9fde379946c3
Reviewed-on: https://go-review.googlesource.com/18859
Reviewed-by: Ian Lance Taylor <iant@golang.org>
misc/cgo/test/sigaltstack.go

index 787653c4825ee61c1e14722327ddd7bfd1db9024..178e71c9b700fdcd98b3d1d5d82401e7a80ff427 100644 (file)
@@ -30,7 +30,7 @@ static void changeSignalStack() {
 }
 
 static void restoreSignalStack() {
-#if defined(__x86_64__) && defined(__APPLE__)
+#if (defined(__x86_64__) || defined(__i386__)) && defined(__APPLE__)
        // The Darwin C library enforces a minimum that the kernel does not.
        // This is OK since we allocated this much space in mpreinit,
        // it was just removed from the buffer by stackalloc.