From 9a8e81cc2d2c65f64418b5cab840e46bcac735c8 Mon Sep 17 00:00:00 2001 From: Qiu Chaofan Date: Fri, 21 Jun 2024 15:49:56 +0800 Subject: [PATCH 1/2] Support AIX operating system in legacy client --- src/client/legacy/connect/http.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/client/legacy/connect/http.rs b/src/client/legacy/connect/http.rs index 9904a97..8c07a27 100644 --- a/src/client/legacy/connect/http.rs +++ b/src/client/legacy/connect/http.rs @@ -108,18 +108,19 @@ 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", @@ -131,6 +132,7 @@ impl TcpKeepaliveConfig { } #[cfg(any( + target_os = "aix", target_os = "openbsd", target_os = "redox", target_os = "solaris", From 4277e1980a58749ed1763fe563f5e73ff0f2cf83 Mon Sep 17 00:00:00 2001 From: Qiu Chaofan Date: Mon, 24 Jun 2024 11:10:59 +0800 Subject: [PATCH 2/2] Fix codestyle --- src/client/legacy/connect/http.rs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/client/legacy/connect/http.rs b/src/client/legacy/connect/http.rs index 8c07a27..6af9e98 100644 --- a/src/client/legacy/connect/http.rs +++ b/src/client/legacy/connect/http.rs @@ -108,13 +108,23 @@ impl TcpKeepaliveConfig { } } - #[cfg(not(any(target_os = "aix", 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 = "aix", 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 }