diff --git a/vnt/src/tun_tap_device/mod.rs b/vnt/src/tun_tap_device/mod.rs index 100412a..e950563 100644 --- a/vnt/src/tun_tap_device/mod.rs +++ b/vnt/src/tun_tap_device/mod.rs @@ -5,11 +5,13 @@ use tun::device::IFace; use tun::Device; use crate::core::Config; - +#[cfg(any(target_os = "windows", target_os = "linux"))] const DEFAULT_TUN_NAME: &str = "vnt-tun"; +#[cfg(any(target_os = "windows", target_os = "linux"))] const DEFAULT_TAP_NAME: &str = "vnt-tap"; pub fn create_device(config: &Config) -> io::Result> { + #[cfg(any(target_os = "windows", target_os = "linux"))] let default_name: &str = if config.tap { DEFAULT_TAP_NAME } else {