Skip to content

Commit 433c0d1

Browse files
authored
Fix build issues with static Linux SDK (#2206)
This PR fixes some imports so that grpc-swift can be built using the static Linux SDK.
1 parent 384a8db commit 433c0d1

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

Sources/GRPCCore/Call/Client/Internal/RetryDelaySequence.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,12 @@
1515
*/
1616
#if canImport(Darwin)
1717
public import Darwin // should be @usableFromInline
18-
#else
18+
#elseif canImport(Glibc)
1919
public import Glibc // should be @usableFromInline
20+
#elseif canImport(Musl)
21+
public import Musl // should be @usableFromInline
22+
#else
23+
#error("Unsupported OS")
2024
#endif
2125

2226
@usableFromInline

Sources/GRPCInProcessTransport/Syscalls.swift

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,11 @@
1717
#if canImport(Darwin)
1818
private import Darwin
1919
#elseif canImport(Glibc)
20-
private import Glibc
20+
private import Glibc // should be @usableFromInline
2121
#elseif canImport(Musl)
22-
private import Musl
22+
private import Musl // should be @usableFromInline
23+
#else
24+
#error("Unsupported OS")
2325
#endif
2426

2527
enum System {

0 commit comments

Comments
 (0)