mirror of
https://codeberg.org/kiss-community/repo
synced 2024-08-21 05:36:19 +00:00
26 lines
878 B
Diff
26 lines
878 B
Diff
diff --git a/vendor/getrandom-0.2.8/src/util_libc.rs b/vendor/getrandom-0.2.8/src/util_libc.rs
|
|
index d057071..83a3f2b 100644
|
|
--- a/vendor/getrandom-0.2.8/src/util_libc.rs
|
|
+++ b/vendor/getrandom-0.2.8/src/util_libc.rs
|
|
@@ -135,19 +135,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<libc::c_int, Error> {
|
|
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);
|
|
}
|