[dependencies]
-[target.'cfg(target_vendor = "apple")'.dependencies]
+[target.'cfg(any(target_vendor = "apple", target_os = "linux"))'.dependencies]
nix = { version = "0.29.0", features = ["net"] }
+
+[target.'cfg(target_vendor = "apple")'.dependencies]
block2 = "0.5.1"
[target.'cfg(windows)'.dependencies.windows]
#[cfg_attr(windows, path = "watch_win.rs")]
#[cfg_attr(target_vendor = "apple", path = "watch_mac.rs")]
+#[cfg_attr(target_os = "linux", path = "watch_linux.rs")]
mod watch;
#[cfg(unix)]
--- /dev/null
+use crate::Update;\r
+use crate::Error;\r
+\r
+pub(crate) struct WatchHandle;\r
+\r
+pub(crate) fn watch_interfaces<F: FnMut(Update) + 'static>(\r
+ callback: F,\r
+) -> Result<WatchHandle, Error> {\r
+ // stop current worker thread\r
+ // post this into a thread that will use it\r
+ drop(callback);\r
+ Ok(WatchHandle)\r
+}\r