mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-08-04 18:18:03 +00:00
core/io/unix: replace O_NONBLOCK flag from libc with equivalent from rustix
This commit is contained in:
parent
5e9cb58f04
commit
2f90a06533
1 changed files with 2 additions and 3 deletions
|
@ -7,8 +7,7 @@ use log::{debug, trace};
|
|||
use polling::{Event, Events, Poller};
|
||||
use rustix::{
|
||||
fd::{AsFd, AsRawFd},
|
||||
fs,
|
||||
fs::{FlockOperation, OpenOptionsExt},
|
||||
fs::{self, FlockOperation, OFlags, OpenOptionsExt},
|
||||
io::Errno,
|
||||
};
|
||||
use std::cell::RefCell;
|
||||
|
@ -38,7 +37,7 @@ impl IO for UnixIO {
|
|||
trace!("open_file(path = {})", path);
|
||||
let file = std::fs::File::options()
|
||||
.read(true)
|
||||
.custom_flags(libc::O_NONBLOCK)
|
||||
.custom_flags(OFlags::NONBLOCK.bits() as i32)
|
||||
.write(true)
|
||||
.create(matches!(flags, OpenFlags::Create))
|
||||
.open(path)?;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue