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 Jul 19, 2020
1 parent 11b4f9e commit 785e638
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 785e638

Please sign in to comment.