]> Cypherpunks repositories - gostls13.git/commitdiff
misc/cgo/testso: don't use TLS variables on Darwin and OpenBSD.
authorShenghou Ma <minux.ma@gmail.com>
Mon, 24 Feb 2014 01:37:43 +0000 (20:37 -0500)
committerShenghou Ma <minux.ma@gmail.com>
Mon, 24 Feb 2014 01:37:43 +0000 (20:37 -0500)
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

misc/cgo/testso/cgoso_c.c
misc/cgo/testso/cgoso_unix.go

index 9b77a76fcf0161ec03fbe19c09ad5f5231e92d44..7a38022b54736e1c51b48d36b48323c4ea6ecd2a 100644 (file)
@@ -17,6 +17,10 @@ __declspec(dllexport) void sofunc(void);
 #else
 extern void goCallback(void);
 void setCallback(void *f) { (void)f; }
+#endif
+
+// OpenBSD and older Darwin lack TLS support
+#if !defined(__OpenBSD__) && !defined(__APPLE__)
 __thread int tlsvar = 12345;
 #endif
 
index e86f992642e7bccb6d52d2ff92477a8894bd10bb..7d5444cd12b52a59dc2648042a30beb4a12c9dac 100644 (file)
@@ -2,7 +2,7 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-// +build darwin dragonfly freebsd linux netbsd
+// +build dragonfly freebsd linux netbsd
 
 package cgosotest