Skip to content

Commit 5853c2b

Browse files
committed
fix(sys/hermit): remove obsolete network initialization
This function does not exist as of hermit-sys 0.4.1 [1]. Once std does not call this function, we can remove it entirely. [1]: hermit-os/hermit-rs@e38f246#diff-a9b7fa816defab285f0d4fe69d4df4a0cbbcf1c89913000df3273aded949f257R10 Signed-off-by: Martin Kröning <martin.kroening@eonerc.rwth-aachen.de>
1 parent 7e02fd8 commit 5853c2b

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

library/std/src/sys/hermit/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ pub extern "C" fn __rust_abort() {
101101
// SAFETY: must be called only once during runtime initialization.
102102
// NOTE: this is not guaranteed to run, for example when Rust code is called externally.
103103
pub unsafe fn init(argc: isize, argv: *const *const u8, _sigpipe: u8) {
104-
let _ = net::init();
105104
args::init(argc, argv);
106105
}
107106

library/std/src/sys/hermit/net.rs

+1-7
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,7 @@ pub fn cvt_gai(err: i32) -> io::Result<()> {
3333
))
3434
}
3535

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

4438
#[derive(Debug)]
4539
pub struct Socket(FileDesc);

0 commit comments

Comments
 (0)