Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ serde_test = "1.0"
tracing = "0.1"
tracing-subscriber = "0.3"

[target.'cfg(any(target_family = "unix"))'.dependencies]
[target.'cfg(unix)'.dependencies]
boringtun = { path = "boringtun/boringtun", default-features = false, features = [
"device",
] }
Expand Down
2 changes: 1 addition & 1 deletion src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ pub enum WireguardInterfaceError {
#[cfg(target_os = "windows")]
#[error(transparent)]
WindowsError(#[from] WindowsError),
#[cfg(target_family = "unix")]
#[cfg(unix)]
#[error("BoringTun {0}")]
BoringTun(#[from] boringtun::device::Error),
}
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ mod dependencies;
mod wgapi_freebsd;
#[cfg(target_os = "linux")]
mod wgapi_linux;
#[cfg(target_family = "unix")]
#[cfg(unix)]
mod wgapi_userspace;
#[cfg(target_family = "windows")]
mod wgapi_windows;
Expand Down
6 changes: 3 additions & 3 deletions src/wgapi.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! Shared multi-platform management API abstraction
use std::marker::PhantomData;

#[cfg(target_family = "unix")]
#[cfg(unix)]
use boringtun::device::DeviceHandle;
#[cfg(target_os = "windows")]
use wireguard_nt::Adapter;
Expand All @@ -19,7 +19,7 @@ pub struct Userspace;
/// to detect the correct API implementation for most common platforms.
pub struct WGApi<API = Kernel> {
pub(super) ifname: String,
#[cfg(target_family = "unix")]
#[cfg(unix)]
pub(super) device_handle: Option<DeviceHandle>,
#[cfg(target_os = "windows")]
pub(super) adapter: Option<Adapter>,
Expand All @@ -33,7 +33,7 @@ impl<API> WGApi<API> {
check_external_dependencies()?;
Ok(WGApi {
ifname: ifname.into(),
#[cfg(target_family = "unix")]
#[cfg(unix)]
device_handle: None,
#[cfg(target_os = "windows")]
adapter: None,
Expand Down
Loading