Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove libstd dependancy for Opening and Reading files #58

Merged
merged 11 commits into from
Aug 6, 2019
Prev Previous commit
Next Next commit
fix ioctl call
  • Loading branch information
newpavlov authored and josephlr committed Aug 5, 2019
commit 2a638fd993490ad9118764068c7caa5ea43d91c3
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)
}