Skip to content

Commit 785e638

Browse files
authored
Remove workaround for older Linux kernels
Minimum supported kernel version got bumped to 2.6.32 in rust-lang/rust#74163
1 parent 11b4f9e commit 785e638

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/util_libc.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,5 @@ pub unsafe fn open_readonly(path: &str) -> Result<libc::c_int, Error> {
111111
if fd < 0 {
112112
return Err(last_os_error());
113113
}
114-
// O_CLOEXEC works on all Unix targets except for older Linux kernels (pre
115-
// 2.6.23), so we also use an ioctl to make sure FD_CLOEXEC is set.
116-
#[cfg(target_os = "linux")]
117-
libc::ioctl(fd, libc::FIOCLEX);
118114
Ok(fd)
119115
}

0 commit comments

Comments
 (0)