diff --git a/src/util_libc.rs b/src/util_libc.rs index 63b060e7..bd9c7de1 100644 --- a/src/util_libc.rs +++ b/src/util_libc.rs @@ -140,19 +140,11 @@ impl Weak { } } -cfg_if! { - if #[cfg(any(target_os = "linux", target_os = "emscripten"))] { - use libc::open64 as open; - } else { - use libc::open; - } -} - // SAFETY: path must be null terminated, FD must be manually closed. pub unsafe fn open_readonly(path: &str) -> Result { debug_assert_eq!(path.as_bytes().last(), Some(&0)); loop { - let fd = open(path.as_ptr() as *const _, libc::O_RDONLY | libc::O_CLOEXEC); + let fd = libc::open(path.as_ptr() as *const _, libc::O_RDONLY | libc::O_CLOEXEC); if fd >= 0 { return Ok(fd); }