From 016feda545b4e1cbc6363dea49ff20214347db1b Mon Sep 17 00:00:00 2001 From: Gus Cairo Date: Fri, 14 Mar 2025 12:49:26 +0000 Subject: [PATCH] Fix build issues with static Linux SDK --- .../GRPCCore/Call/Client/Internal/RetryDelaySequence.swift | 6 +++++- Sources/GRPCInProcessTransport/Syscalls.swift | 6 ++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Sources/GRPCCore/Call/Client/Internal/RetryDelaySequence.swift b/Sources/GRPCCore/Call/Client/Internal/RetryDelaySequence.swift index f07606f5c..46b3e197d 100644 --- a/Sources/GRPCCore/Call/Client/Internal/RetryDelaySequence.swift +++ b/Sources/GRPCCore/Call/Client/Internal/RetryDelaySequence.swift @@ -15,8 +15,12 @@ */ #if canImport(Darwin) public import Darwin // should be @usableFromInline -#else +#elseif canImport(Glibc) public import Glibc // should be @usableFromInline +#elseif canImport(Musl) +public import Musl // should be @usableFromInline +#else +#error("Unsupported OS") #endif @usableFromInline diff --git a/Sources/GRPCInProcessTransport/Syscalls.swift b/Sources/GRPCInProcessTransport/Syscalls.swift index df49a49f2..538eb3a78 100644 --- a/Sources/GRPCInProcessTransport/Syscalls.swift +++ b/Sources/GRPCInProcessTransport/Syscalls.swift @@ -17,9 +17,11 @@ #if canImport(Darwin) private import Darwin #elseif canImport(Glibc) -private import Glibc +private import Glibc // should be @usableFromInline #elseif canImport(Musl) -private import Musl +private import Musl // should be @usableFromInline +#else +#error("Unsupported OS") #endif enum System {