From: Russ Cox Date: Sun, 24 Jan 2016 16:02:19 +0000 (-0500) Subject: misc/cgo/test: fix test on darwin/386 with cgo enabled X-Git-Tag: go1.6rc1~54 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=544f28a25ec9421d52bbdd7c6272b4f1d4067964;p=gostls13.git misc/cgo/test: fix test on darwin/386 with cgo enabled 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 --- diff --git a/misc/cgo/test/sigaltstack.go b/misc/cgo/test/sigaltstack.go index 787653c482..178e71c9b7 100644 --- a/misc/cgo/test/sigaltstack.go +++ b/misc/cgo/test/sigaltstack.go @@ -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.