From c086bc1d7d383d29721ce4a379683f0f4670a536 Mon Sep 17 00:00:00 2001 From: Shenghou Ma Date: Wed, 7 Mar 2012 14:24:28 +0800 Subject: [PATCH] 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 --- src/cmd/dist/build.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/dist/build.c b/src/cmd/dist/build.c index 6bcc0f53271..d5fcfbedb30 100644 --- a/src/cmd/dist/build.c +++ b/src/cmd/dist/build.c @@ -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");