Skip to content

Commit

Permalink
Auto merge of #127732 - GrigorenkoPV:teeos-safe-sys-init, r=Amanieu
Browse files Browse the repository at this point in the history
  • Loading branch information
bors committed Jul 15, 2024
2 parents 8b72d7a + bbf303e commit 594702e
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions library/std/src/rt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,14 @@ macro_rules! rtunwrap {
// `compiler/rustc_session/src/config/sigpipe.rs`.
#[cfg_attr(test, allow(dead_code))]
unsafe fn init(argc: isize, argv: *const *const u8, sigpipe: u8) {
#[cfg_attr(target_os = "teeos", allow(unused_unsafe))]
unsafe {
sys::init(argc, argv, sigpipe);
sys::init(argc, argv, sigpipe)
};

// Set up the current thread to give it the right name.
let thread = Thread::new_main();
thread::set_current(thread);
}
// Set up the current thread to give it the right name.
let thread = Thread::new_main();
thread::set_current(thread);
}

// One-time runtime cleanup.
Expand Down

0 comments on commit 594702e

Please sign in to comment.