Skip to content

Commit 386e6d5

Browse files
authored
Define packet domain only on Linux
1 parent 78c3ed1 commit 386e6d5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/socket.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -801,9 +801,9 @@ impl Domain {
801801

802802
/// Domain for low-level packet interface, corresponding to `AF_PACKET`.
803803
///
804-
/// This function is only available on Unix when the `unix` feature is
804+
/// This function is only available on Linux when the `unix` feature is
805805
/// activated.
806-
#[cfg(all(unix, feature = "unix"))]
806+
#[cfg(all(unix, feature = "unix", target_os = "linux"))]
807807
pub fn packet() -> Domain {
808808
Domain(c::AF_PACKET)
809809
}

0 commit comments

Comments
 (0)