Skip to content

Commit e319ff4

Browse files
committed
import correct lib based on platform
1 parent bf2f10d commit e319ff4

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Sources/AWSLambdaRuntime/LambdaClock.swift

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,16 @@
1212
//
1313
//===----------------------------------------------------------------------===//
1414

15-
#if os(Linux)
15+
#if os(macOS)
16+
import Darwin.C
17+
#elseif canImport(Glibc)
1618
import Glibc
19+
#elseif canImport(Musl)
20+
import Musl
21+
#elseif os(Windows)
22+
import ucrt
1723
#else
18-
import Darwin
24+
#error("Unsupported platform")
1925
#endif
2026

2127
/// A clock implementation based on Unix epoch time for AWS Lambda runtime operations.

0 commit comments

Comments
 (0)