Commit c086bc1d authored by Shenghou Ma's avatar Shenghou Ma

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
parent ca21b128
......@@ -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");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment