Skip to content

Commit 8c3e39d

Browse files
ihciaholix0r
authored andcommitted
transport: Fix orig-dst compilation on non-Linux targets (#974)
The `orig_dst_addr` helper function does not compile when the target OS is not Linux. This change fixes the signature and return value of the helper for non-Linux targets
1 parent 74a1632 commit 8c3e39d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

linkerd/proxy/transport/src/orig_dst.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,11 @@ fn orig_dst_addr(sock: &TcpStream) -> io::Result<OrigDstAddr> {
8686
}
8787

8888
#[cfg(not(target_os = "linux"))]
89-
fn orig_dst_addr(&self, _: &TcpStream) -> io::Result<OrigDstAddr> {
90-
io::Error::new(
89+
fn orig_dst_addr(_: &TcpStream) -> io::Result<OrigDstAddr> {
90+
Err(io::Error::new(
9191
io::ErrorKind::Other,
9292
"SO_ORIGINAL_DST not supported on this operating system",
93-
)
93+
))
9494
}
9595

9696
#[cfg(target_os = "linux")]

0 commit comments

Comments
 (0)