Skip to content

Commit 24062a2

Browse files
committed
ExampleSwiftLibrary: adjust imports for Windows
Guard the `Darwin` import to when the module is available rather than assuming it to be the default. Add a case for Windows.
1 parent 79237aa commit 24062a2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Sources/ExampleSwiftLibrary/MySwiftLibrary.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@
1919

2020
#if os(Linux)
2121
import Glibc
22-
#else
22+
#elseif os(Windows)
23+
import CRT
24+
#elseif canImport(Darwin)
2325
import Darwin.C
2426
#endif
2527

0 commit comments

Comments
 (0)