From 8399e4195b31f6f188109363292ed220226146f4 Mon Sep 17 00:00:00 2001 From: Greg V Date: Fri, 15 Apr 2022 02:29:01 +0300 Subject: [PATCH] Use kqueue as recommended watcher on OpenBSD, NetBSD and DragonFly --- src/lib.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 8b255669..70bb71b9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -111,6 +111,9 @@ pub use crate::fsevent::FsEventWatcher; pub use crate::inotify::INotifyWatcher; #[cfg(any( target_os = "freebsd", + target_os = "openbsd", + target_os = "netbsd", + target_os = "dragonflybsd", all(target_os = "macos", feature = "macos_kqueue") ))] pub use crate::kqueue::KqueueWatcher; @@ -269,6 +272,9 @@ pub type RecommendedWatcher = ReadDirectoryChangesWatcher; /// The recommended `Watcher` implementation for the current platform #[cfg(any( target_os = "freebsd", + target_os = "openbsd", + target_os = "netbsd", + target_os = "dragonflybsd", all(target_os = "macos", feature = "macos_kqueue") ))] pub type RecommendedWatcher = KqueueWatcher; @@ -277,7 +283,10 @@ pub type RecommendedWatcher = KqueueWatcher; target_os = "linux", target_os = "macos", target_os = "windows", - target_os = "freebsd" + target_os = "freebsd", + target_os = "openbsd", + target_os = "netbsd", + target_os = "dragonflybsd" )))] pub type RecommendedWatcher = PollWatcher;