Skip to content

Commit c73cfb8

Browse files
#[allow(dead_code)]
1 parent 4983fda commit c73cfb8

File tree

1 file changed

+5
-3
lines changed
  • library/std/src/sys/pal/unix

1 file changed

+5
-3
lines changed

library/std/src/sys/pal/unix/mod.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -61,19 +61,21 @@ pub unsafe fn init(argc: isize, argv: *const *const u8, sigpipe: u8) {
6161
}
6262

6363
unsafe fn sanitize_standard_fds() {
64+
#[allow(dead_code)]
6465
let mut opened_devnull = -1;
66+
#[allow(dead_code)]
6567
let mut open_devnull = || {
6668
#[cfg(not(all(target_os = "linux", target_env = "gnu")))]
67-
use libc::open as open64;
69+
use libc::open;
6870
#[cfg(all(target_os = "linux", target_env = "gnu"))]
69-
use libc::open64;
71+
use libc::open64 as open;
7072

7173
if opened_devnull != -1 {
7274
if libc::dup(opened_devnull) != -1 {
7375
return;
7476
}
7577
}
76-
opened_devnull = open64(c"/dev/null".as_ptr(), libc::O_RDWR, 0);
78+
opened_devnull = open(c"/dev/null".as_ptr(), libc::O_RDWR, 0);
7779
if opened_devnull == -1 {
7880
// If the stream is closed but we failed to reopen it, abort the
7981
// process. Otherwise we wouldn't preserve the safety of

0 commit comments

Comments
 (0)