about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-12-09 18:42:15 +0000
committerbors <bors@rust-lang.org>2015-12-09 18:42:15 +0000
commit08a5b112ed7af90e31a355e409f637997e458fbc (patch)
tree0a8ea74e42cd0ac1350daf305e62a98b757cf65b /src/libstd
parent6bf8cc578985c5236cb90924994816ee7a25ce8a (diff)
parent3a6fd55fd13a0297381657a33c67d1e8502bcfb5 (diff)
downloadrust-08a5b112ed7af90e31a355e409f637997e458fbc.tar.gz
rust-08a5b112ed7af90e31a355e409f637997e458fbc.zip
Auto merge of #30270 - DiamondLovesYou:fix-30231, r=alexcrichton
Closes #30231
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/sys/unix/fd.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/sys/unix/fd.rs b/src/libstd/sys/unix/fd.rs
index d42c15a97ac..e09f4ca27bc 100644
--- a/src/libstd/sys/unix/fd.rs
+++ b/src/libstd/sys/unix/fd.rs
@@ -60,8 +60,8 @@ impl FileDesc {
     #[cfg(target_env = "newlib")]
     pub fn set_cloexec(&self) {
         unsafe {
-            let previous = libc::fnctl(self.fd, libc::F_GETFD);
-            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);
             debug_assert_eq!(ret, 0);
         }
     }