Skip to content

Commit

Permalink
Remove workaround for older Linux kernels
Browse files Browse the repository at this point in the history
Minimum supported kernel version got bumped to 2.6.32 in rust-lang/rust#74163
  • Loading branch information
newpavlov authored and josephlr committed Jul 22, 2020
1 parent f6af828 commit 2b03b0e
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/util_libc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,5 @@ pub unsafe fn open_readonly(path: &str) -> Result<libc::c_int, Error> {
if fd < 0 {
return Err(last_os_error());
}
// 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(fd, libc::FIOCLEX);
Ok(fd)
}

0 comments on commit 2b03b0e

Please sign in to comment.