From 5df2ddd724bb2aa4f73fcaddd45b581c32c0b4e6 Mon Sep 17 00:00:00 2001 From: Johnathan Corgan Date: Fri, 18 Sep 2026 21:56:39 +0000 Subject: [PATCH] fix(gateway): restrict elapsed_us to Linux The admission-limit change added elapsed_us without the target_os guard every other item in the binary carries, so fips-gateway failed to compile on macOS, Windows and FreeBSD, where std::time::Instant is not imported. --- src/bin/fips-gateway.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/bin/fips-gateway.rs b/src/bin/fips-gateway.rs index def8029e..6a6979fb 100644 --- a/src/bin/fips-gateway.rs +++ b/src/bin/fips-gateway.rs @@ -55,6 +55,7 @@ fn main() { /// Microseconds since `started`, saturating, for the timing fields on debug /// lines. +#[cfg(target_os = "linux")] fn elapsed_us(started: Instant) -> u64 { u64::try_from(started.elapsed().as_micros()).unwrap_or(u64::MAX) }