]> Cypherpunks repositories - gostls13.git/commitdiff
runtime/cgo: fix data declaration to be extern
authorRuss Cox <rsc@golang.org>
Mon, 7 Nov 2011 18:15:06 +0000 (13:15 -0500)
committerRuss Cox <rsc@golang.org>
Mon, 7 Nov 2011 18:15:06 +0000 (13:15 -0500)
Otherwise some OS X toolchains complain about the redeclaration
of libcgo_thread_start by multiple object files.  The real definition
is in util.c.

Fixes #2167.

R=golang-dev, bradfitz
CC=golang-dev
https://golang.org/cl/5364045

src/pkg/runtime/cgo/libcgo.h

index 91032959c78882d81b69ef0b3f2b23c1fa40098d..c31d19d76dc9fde0785012f951daecaa62f52cc1 100644 (file)
@@ -42,7 +42,7 @@ struct ThreadStart
  * Makes a local copy of the ThreadStart and
  * calls libcgo_sys_thread_start(ts).
  */
-void (*libcgo_thread_start)(ThreadStart *ts);
+extern void (*libcgo_thread_start)(ThreadStart *ts);
 
 /*
  * Creates the new operating system thread (OS, arch dependent).