mirror of
https://github.com/golang/go
synced 2024-11-23 04:40:09 -07:00
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
This commit is contained in:
parent
e33e47e844
commit
bcf3d55ed9
@ -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 @@
|
|||||||
// 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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user