From a5f257a042f19dfe0023a0e5ad7dd673b32ad087 Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Wed, 14 Aug 2013 12:47:06 -0400 Subject: [PATCH] cmd/cgo: fix windows build The shared library changes broke the windows build because __attribute__ ((visibility ("hidden"))) is not supported in windows gcc. This change removes the attribute, as it is only needed when building shared libraries. R=rsc CC=golang-dev https://golang.org/cl/12829044 --- src/cmd/cgo/out.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/cgo/out.go b/src/cmd/cgo/out.go index 140febb008..012e0365bb 100644 --- a/src/cmd/cgo/out.go +++ b/src/cmd/cgo/out.go @@ -494,7 +494,7 @@ func (p *Package) writeOutputFunc(fgcc *os.File, n *Name) { // Gcc wrapper unpacks the C argument struct // and calls the actual C function. - fmt.Fprintf(fgcc, "__attribute__ ((visibility (\"hidden\"))) void\n") + fmt.Fprintf(fgcc, "void\n") fmt.Fprintf(fgcc, "_cgo%s%s(void *v)\n", cPrefix, n.Mangle) fmt.Fprintf(fgcc, "{\n") if n.AddError { -- 2.48.1