mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-06 17:31:14 -03:00
Fix use of deprecated symbols in Nix
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
use crate::wchar::prelude::*;
|
use crate::wchar::prelude::*;
|
||||||
use crate::wutil::wdirname;
|
use crate::wutil::wdirname;
|
||||||
use crate::FLOGF;
|
use crate::FLOGF;
|
||||||
use nix::sys::event::{EventFilter, EventFlag, FilterFlag, KEvent, Kqueue};
|
use nix::sys::event::{EvFlags, EventFilter, FilterFlag, KEvent, Kqueue};
|
||||||
use std::fs::File;
|
use std::fs::File;
|
||||||
use std::os::fd::AsFd;
|
use std::os::fd::AsFd;
|
||||||
use std::os::unix::fs::MetadataExt;
|
use std::os::unix::fs::MetadataExt;
|
||||||
@@ -53,7 +53,7 @@ pub fn new_at(path: &wstr) -> Option<Self> {
|
|||||||
let change_event = KEvent::new(
|
let change_event = KEvent::new(
|
||||||
dir_fd.as_raw_fd() as usize,
|
dir_fd.as_raw_fd() as usize,
|
||||||
EventFilter::EVFILT_VNODE,
|
EventFilter::EVFILT_VNODE,
|
||||||
EventFlag::EV_ADD | EventFlag::EV_CLEAR,
|
EvFlags::EV_ADD | EvFlags::EV_CLEAR,
|
||||||
// NOTE_EXTEND w/ a dir fd: dir entry added or removed as the result of a rename,
|
// NOTE_EXTEND w/ a dir fd: dir entry added or removed as the result of a rename,
|
||||||
// but NOT if the rename was within the directory.
|
// but NOT if the rename was within the directory.
|
||||||
// NOTE_LINK w/ a dir fd: subdirectory created or deleted
|
// NOTE_LINK w/ a dir fd: subdirectory created or deleted
|
||||||
@@ -112,7 +112,7 @@ fn notification_fd_became_readable(&self, fd: RawFd) -> bool {
|
|||||||
let mut events = [KEvent::new(
|
let mut events = [KEvent::new(
|
||||||
0,
|
0,
|
||||||
EventFilter::EVFILT_READ,
|
EventFilter::EVFILT_READ,
|
||||||
EventFlag::empty(),
|
EvFlags::empty(),
|
||||||
FilterFlag::empty(),
|
FilterFlag::empty(),
|
||||||
0,
|
0,
|
||||||
0,
|
0,
|
||||||
@@ -133,7 +133,7 @@ fn notification_fd_became_readable(&self, fd: RawFd) -> bool {
|
|||||||
if event_count > 0 {
|
if event_count > 0 {
|
||||||
have_event = true;
|
have_event = true;
|
||||||
for event in &events[..event_count] {
|
for event in &events[..event_count] {
|
||||||
if event.flags().contains(EventFlag::EV_ERROR) {
|
if event.flags().contains(EvFlags::EV_ERROR) {
|
||||||
// Error encountered processing this changelist item
|
// Error encountered processing this changelist item
|
||||||
FLOGF!(
|
FLOGF!(
|
||||||
warning,
|
warning,
|
||||||
|
|||||||
Reference in New Issue
Block a user