Skip to content

Commit

Permalink
ExampleSwiftLibrary: adjust imports for Windows
Browse files Browse the repository at this point in the history
Guard the `Darwin` import to when the module is available rather than
assuming it to be the default. Add a case for Windows.
  • Loading branch information
compnerd committed Nov 8, 2024
1 parent 79237aa commit 24062a2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Sources/ExampleSwiftLibrary/MySwiftLibrary.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,9 @@

#if os(Linux)
import Glibc
#else
#elseif os(Windows)
import CRT
#elseif canImport(Darwin)
import Darwin.C
#endif

Expand Down

0 comments on commit 24062a2

Please sign in to comment.