@@ -248,7 +248,9 @@ pub unsafe fn set_name(name: &str) {
248
248
}
249
249
}
250
250
251
- #[ cfg( any( target_os = "freebsd" , target_os = "dragonfly" ) ) ]
251
+ #[ cfg( any( target_os = "freebsd" ,
252
+ target_os = "dragonfly" ,
253
+ target_os = "openbsd" ) ) ]
252
254
pub unsafe fn set_name ( name : & str ) {
253
255
// pthread_set_name_np() since almost forever on all BSDs
254
256
let cname = CString :: from_slice ( name. as_bytes ( ) ) ;
@@ -314,7 +316,9 @@ extern {
314
316
stacksize : * mut libc:: size_t ) -> libc:: c_int ;
315
317
}
316
318
317
- #[ cfg( any( target_os = "freebsd" , target_os = "dragonfly" ) ) ]
319
+ #[ cfg( any( target_os = "freebsd" ,
320
+ target_os = "dragonfly" ,
321
+ target_os = "openbsd" ) ) ]
318
322
extern {
319
323
pub fn pthread_self ( ) -> libc:: pthread_t ;
320
324
fn pthread_set_name_np ( tid : libc:: pthread_t , name : * const libc:: c_char ) ;
@@ -330,7 +334,6 @@ extern {
330
334
331
335
#[ cfg( target_os = "openbsd" ) ]
332
336
extern {
333
- pub fn pthread_self ( ) -> libc:: pthread_t ;
334
337
pub fn pthread_stackseg_np ( thread : libc:: pthread_t ,
335
338
sinfo : * mut stack_t ) -> libc:: c_uint ;
336
339
pub fn pthread_main_np ( ) -> libc:: c_uint ;
0 commit comments