Skip to content

Commit f6414b0

Browse files
committed
openbsd: rebase to master
- incoporate changes introduced by #21678
1 parent fdb5d77 commit f6414b0

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/libstd/sys/unix/thread.rs

+6-3
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,9 @@ pub unsafe fn set_name(name: &str) {
248248
}
249249
}
250250

251-
#[cfg(any(target_os = "freebsd", target_os = "dragonfly"))]
251+
#[cfg(any(target_os = "freebsd",
252+
target_os = "dragonfly",
253+
target_os = "openbsd"))]
252254
pub unsafe fn set_name(name: &str) {
253255
// pthread_set_name_np() since almost forever on all BSDs
254256
let cname = CString::from_slice(name.as_bytes());
@@ -314,7 +316,9 @@ extern {
314316
stacksize: *mut libc::size_t) -> libc::c_int;
315317
}
316318

317-
#[cfg(any(target_os = "freebsd", target_os = "dragonfly"))]
319+
#[cfg(any(target_os = "freebsd",
320+
target_os = "dragonfly",
321+
target_os = "openbsd"))]
318322
extern {
319323
pub fn pthread_self() -> libc::pthread_t;
320324
fn pthread_set_name_np(tid: libc::pthread_t, name: *const libc::c_char);
@@ -330,7 +334,6 @@ extern {
330334

331335
#[cfg(target_os = "openbsd")]
332336
extern {
333-
pub fn pthread_self() -> libc::pthread_t;
334337
pub fn pthread_stackseg_np(thread: libc::pthread_t,
335338
sinfo: *mut stack_t) -> libc::c_uint;
336339
pub fn pthread_main_np() -> libc::c_uint;

0 commit comments

Comments
 (0)