Skip to content

Commit

Permalink
Support AIX operating system in legacy client (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
ecnelises authored Jun 24, 2024
1 parent 597f92b commit 53aadac
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions src/client/legacy/connect/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,18 +108,29 @@ impl TcpKeepaliveConfig {
}
}

#[cfg(not(any(target_os = "openbsd", target_os = "redox", target_os = "solaris")))]
#[cfg(not(any(
target_os = "aix",
target_os = "openbsd",
target_os = "redox",
target_os = "solaris"
)))]
fn ka_with_interval(ka: TcpKeepalive, interval: Duration, dirty: &mut bool) -> TcpKeepalive {
*dirty = true;
ka.with_interval(interval)
}

#[cfg(any(target_os = "openbsd", target_os = "redox", target_os = "solaris"))]
#[cfg(any(
target_os = "aix",
target_os = "openbsd",
target_os = "redox",
target_os = "solaris"
))]
fn ka_with_interval(ka: TcpKeepalive, _: Duration, _: &mut bool) -> TcpKeepalive {
ka // no-op as keepalive interval is not supported on this platform
}

#[cfg(not(any(
target_os = "aix",
target_os = "openbsd",
target_os = "redox",
target_os = "solaris",
Expand All @@ -131,6 +142,7 @@ impl TcpKeepaliveConfig {
}

#[cfg(any(
target_os = "aix",
target_os = "openbsd",
target_os = "redox",
target_os = "solaris",
Expand Down

0 comments on commit 53aadac

Please sign in to comment.