]> Cypherpunks repositories - gostls13.git/commitdiff
ld: return > 0 exit code on unsafe import
authorAndrew Gerrand <adg@golang.org>
Tue, 22 Mar 2011 04:00:21 +0000 (15:00 +1100)
committerAndrew Gerrand <adg@golang.org>
Tue, 22 Mar 2011 04:00:21 +0000 (15:00 +1100)
R=rsc
CC=golang-dev
https://golang.org/cl/4273092

src/cmd/ld/go.c

index a64153ff2f97e29bd3c2124e6125d16c74a13c01..b76e469aed720365b6926534a5471535c8f98bb4 100644 (file)
@@ -135,6 +135,7 @@ ldpkg(Biobuf *f, char *pkg, int64 len, char *filename, int whence)
                if(debug['u'] && whence != ArchiveObj &&
                   (p0+6 > p1 || memcmp(p0, " safe\n", 6) != 0)) {
                        fprint(2, "%s: load of unsafe package %s\n", argv0, filename);
+                       nerrors++;
                        errorexit();
                }
                if(p0 < p1) {