We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6bf8cc5 + 3a6fd55 commit 08a5b11Copy full SHA for 08a5b11
src/libstd/sys/unix/fd.rs
@@ -60,8 +60,8 @@ impl FileDesc {
60
#[cfg(target_env = "newlib")]
61
pub fn set_cloexec(&self) {
62
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);
+ let previous = libc::fcntl(self.fd, libc::F_GETFD);
+ let ret = libc::fcntl(self.fd, libc::F_SETFD, previous | libc::FD_CLOEXEC);
65
debug_assert_eq!(ret, 0);
66
}
67
0 commit comments