Commit bcf3d55e authored by Shenghou Ma's avatar Shenghou Ma

misc/cgo/testso: don't use TLS variables on Darwin and OpenBSD.

Fix build for 10.6 Darwin builders and OpenBSD builers.

LGTM=jsing
R=golang-codereviews, dave, jsing
CC=golang-codereviews
https://golang.org/cl/67710043
parent e33e47e8
...@@ -17,6 +17,10 @@ __declspec(dllexport) void sofunc(void); ...@@ -17,6 +17,10 @@ __declspec(dllexport) void sofunc(void);
#else #else
extern void goCallback(void); extern void goCallback(void);
void setCallback(void *f) { (void)f; } void setCallback(void *f) { (void)f; }
#endif
// OpenBSD and older Darwin lack TLS support
#if !defined(__OpenBSD__) && !defined(__APPLE__)
__thread int tlsvar = 12345; __thread int tlsvar = 12345;
#endif #endif
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style // Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file. // license that can be found in the LICENSE file.
// +build darwin dragonfly freebsd linux netbsd // +build dragonfly freebsd linux netbsd
package cgosotest package cgosotest
......
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