Преглед на файлове

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.
Gus Cairo преди 8 месеца
родител
ревизия
433c0d1337
променени са 2 файла, в които са добавени 9 реда и са изтрити 3 реда
  1. 5 1
      Sources/GRPCCore/Call/Client/Internal/RetryDelaySequence.swift
  2. 4 2
      Sources/GRPCInProcessTransport/Syscalls.swift

+ 5 - 1
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

+ 4 - 2
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 {