Skip to content

Commit 4ed4691

Browse files
committed
add target OS and specify feature only available on linux
1 parent 237d500 commit 4ed4691

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/socket.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -898,6 +898,8 @@ impl Socket {
898898
///
899899
/// TProxy redirection with the iptables TPROXY target also
900900
/// requires that this option be set on the redirected socket.
901+
/// this feature is only available on linux
902+
#[cfg(any(target_os = "linux"))]
901903
pub fn set_ip_transparent(&self) -> io::Result<()> {
902904
unsafe {
903905
setsockopt(

0 commit comments

Comments
 (0)