Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(sys/hermit): remove obsolete network initialization #115309

Merged
merged 1 commit into from
Aug 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion library/std/src/sys/hermit/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ pub extern "C" fn __rust_abort() {
// SAFETY: must be called only once during runtime initialization.
// NOTE: this is not guaranteed to run, for example when Rust code is called externally.
pub unsafe fn init(argc: isize, argv: *const *const u8, _sigpipe: u8) {
let _ = net::init();
args::init(argc, argv);
}

Expand Down
8 changes: 1 addition & 7 deletions library/std/src/sys/hermit/net.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,7 @@ pub fn cvt_gai(err: i32) -> io::Result<()> {
))
}

/// Checks whether the HermitCore's socket interface has been started already, and
/// if not, starts it.
pub fn init() {
if unsafe { netc::network_init() } < 0 {
panic!("Unable to initialize network interface");
}
}
pub fn init() {}

#[derive(Debug)]
pub struct Socket(FileDesc);
Expand Down
Loading