1
0
mirror of https://github.com/golang/go synced 2024-11-25 02:27:56 -07:00

cmd/dist: fix build for Linux/ARM

find() returns -1 when not found.

R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5752068
This commit is contained in:
Shenghou Ma 2012-03-07 14:24:28 +08:00
parent ca21b1289c
commit c086bc1d7d

View File

@ -1321,7 +1321,7 @@ cmdenv(int argc, char **argv)
xprintf(format, "GOTOOLDIR", tooldir);
xprintf(format, "GOCHAR", gochar);
if(find(bprintf(&b, "%s/%s", goos, goarch), okcgo, nelem(okcgo)))
if(find(bprintf(&b, "%s/%s", goos, goarch), okcgo, nelem(okcgo)) >= 0)
xprintf(format, "CGO_ENABLED", "1");
else
xprintf(format, "CGO_ENABLED", "0");