Skip to content

Commit

Permalink
fix ioctl call
Browse files Browse the repository at this point in the history
  • Loading branch information
newpavlov authored and josephlr committed Aug 5, 2019
1 parent 2602f24 commit 2a638fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util_libc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,6 @@ pub unsafe fn open_readonly(path: &str) -> Option<libc::c_int> {
// O_CLOEXEC works on all Unix targets except for older Linux kernels (pre
// 2.6.23), so we also use an ioctl to make sure FD_CLOEXEC is set.
#[cfg(target_os = "linux")]
libc::ioctl(self.fd, libc::FIOCLEX);
libc::ioctl(fd, libc::FIOCLEX);
Some(fd)
}

0 comments on commit 2a638fd

Please sign in to comment.