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:
parent
ca21b1289c
commit
c086bc1d7d
2
src/cmd/dist/build.c
vendored
2
src/cmd/dist/build.c
vendored
@ -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");
|
||||
|
Loading…
Reference in New Issue
Block a user