diff options
| author | наб <nabijaczleweli@nabijaczleweli.xyz> | 2025-03-26 02:08:15 +0100 |
|---|---|---|
| committer | наб <nabijaczleweli@nabijaczleweli.xyz> | 2025-03-26 02:08:15 +0100 |
| commit | c73cfb83b7b7855f19603420990775ebb3d32d95 (patch) | |
| tree | b78c8506f279356f0ec3695bcded61975b9d94f8 | |
| parent | 4983fdaada0c78d48e57f177453e5b954d5caad3 (diff) | |
| download | rust-c73cfb83b7b7855f19603420990775ebb3d32d95.tar.gz rust-c73cfb83b7b7855f19603420990775ebb3d32d95.zip | |
#[allow(dead_code)]
| -rw-r--r-- | library/std/src/sys/pal/unix/mod.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/library/std/src/sys/pal/unix/mod.rs b/library/std/src/sys/pal/unix/mod.rs index ec61fcad7e8..20b670fdd19 100644 --- a/library/std/src/sys/pal/unix/mod.rs +++ b/library/std/src/sys/pal/unix/mod.rs @@ -61,19 +61,21 @@ pub unsafe fn init(argc: isize, argv: *const *const u8, sigpipe: u8) { } unsafe fn sanitize_standard_fds() { + #[allow(dead_code)] let mut opened_devnull = -1; + #[allow(dead_code)] let mut open_devnull = || { #[cfg(not(all(target_os = "linux", target_env = "gnu")))] - use libc::open as open64; + use libc::open; #[cfg(all(target_os = "linux", target_env = "gnu"))] - use libc::open64; + use libc::open64 as open; if opened_devnull != -1 { if libc::dup(opened_devnull) != -1 { return; } } - opened_devnull = open64(c"/dev/null".as_ptr(), libc::O_RDWR, 0); + opened_devnull = open(c"/dev/null".as_ptr(), libc::O_RDWR, 0); if opened_devnull == -1 { // If the stream is closed but we failed to reopen it, abort the // process. Otherwise we wouldn't preserve the safety of |
