Skip to content

Commit 08a5b11

Browse files
committed
Auto merge of #30270 - DiamondLovesYou:fix-30231, r=alexcrichton
Closes #30231
2 parents 6bf8cc5 + 3a6fd55 commit 08a5b11

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: src/libstd/sys/unix/fd.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ impl FileDesc {
6060
#[cfg(target_env = "newlib")]
6161
pub fn set_cloexec(&self) {
6262
unsafe {
63-
let previous = libc::fnctl(self.fd, libc::F_GETFD);
64-
let ret = libc::fnctl(self.fd, libc::F_SETFD, previous | libc::FD_CLOEXEC);
63+
let previous = libc::fcntl(self.fd, libc::F_GETFD);
64+
let ret = libc::fcntl(self.fd, libc::F_SETFD, previous | libc::FD_CLOEXEC);
6565
debug_assert_eq!(ret, 0);
6666
}
6767
}

0 commit comments

Comments
 (0)