Skip to content
Snippets Groups Projects
Commit 2b03b0e0 authored by Artyom Pavlov's avatar Artyom Pavlov Committed by Joseph Richey
Browse files

Remove workaround for older Linux kernels

Minimum supported kernel version got bumped to 2.6.32 in rust-lang/rust#74163
parent f6af8287
No related branches found
No related tags found
No related merge requests found
...@@ -111,9 +111,5 @@ pub unsafe fn open_readonly(path: &str) -> Result<libc::c_int, Error> { ...@@ -111,9 +111,5 @@ pub unsafe fn open_readonly(path: &str) -> Result<libc::c_int, Error> {
if fd < 0 { if fd < 0 {
return Err(last_os_error()); 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) Ok(fd)
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment