@@ -81,6 +81,7 @@ macro_rules! __scoped_thread_local_inner {
8181 #[ cfg_attr( not( any( windows,
8282 target_os = "android" ,
8383 target_os = "ios" ,
84+ target_os = "openbsd" ,
8485 target_arch = "aarch64" ) ) ,
8586 thread_local) ]
8687 static $name: :: std:: thread_local:: scoped:: Key <$t> =
@@ -90,6 +91,7 @@ macro_rules! __scoped_thread_local_inner {
9091 #[ cfg_attr( not( any( windows,
9192 target_os = "android" ,
9293 target_os = "ios" ,
94+ target_os = "openbsd" ,
9395 target_arch = "aarch64" ) ) ,
9496 thread_local) ]
9597 pub static $name: :: std:: thread_local:: scoped:: Key <$t> =
@@ -98,14 +100,22 @@ macro_rules! __scoped_thread_local_inner {
98100 ( $t: ty) => ( {
99101 use std:: thread_local:: scoped:: Key as __Key;
100102
101- #[ cfg( not( any( windows, target_os = "android" , target_os = "ios" , target_arch = "aarch64" ) ) ) ]
103+ #[ cfg( not( any( windows,
104+ target_os = "android" ,
105+ target_os = "ios" ,
106+ target_os = "openbsd" ,
107+ target_arch = "aarch64" ) ) ) ]
102108 const _INIT: __Key<$t> = __Key {
103109 inner: :: std:: thread_local:: scoped:: __impl:: KeyInner {
104110 inner: :: std:: cell:: UnsafeCell { value: 0 as * mut _ } ,
105111 }
106112 } ;
107113
108- #[ cfg( any( windows, target_os = "android" , target_os = "ios" , target_arch = "aarch64" ) ) ]
114+ #[ cfg( any( windows,
115+ target_os = "android" ,
116+ target_os = "ios" ,
117+ target_os = "openbsd" ,
118+ target_arch = "aarch64" ) ) ]
109119 const _INIT: __Key<$t> = __Key {
110120 inner: :: std:: thread_local:: scoped:: __impl:: KeyInner {
111121 inner: :: std:: thread_local:: scoped:: __impl:: OS_INIT ,
@@ -205,7 +215,11 @@ impl<T> Key<T> {
205215 }
206216}
207217
208- #[ cfg( not( any( windows, target_os = "android" , target_os = "ios" , target_arch = "aarch64" ) ) ) ]
218+ #[ cfg( not( any( windows,
219+ target_os = "android" ,
220+ target_os = "ios" ,
221+ target_os = "openbsd" ,
222+ target_arch = "aarch64" ) ) ) ]
209223mod imp {
210224 use std:: cell:: UnsafeCell ;
211225
@@ -223,7 +237,11 @@ mod imp {
223237 }
224238}
225239
226- #[ cfg( any( windows, target_os = "android" , target_os = "ios" , target_arch = "aarch64" ) ) ]
240+ #[ cfg( any( windows,
241+ target_os = "android" ,
242+ target_os = "ios" ,
243+ target_os = "openbsd" ,
244+ target_arch = "aarch64" ) ) ]
227245mod imp {
228246 use marker;
229247 use sys_common:: thread_local:: StaticKey as OsStaticKey ;
0 commit comments