Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 71b2231

Browse files
authored
Try importing Musl if Glibc isn't available (#376)
This improves platform support by letting the library be compiled by e.g. the Swift Static Linux SDK. The import pattern follows an example[1] presented in the Swift docs. [1]: https://www.swift.org/documentation/articles/static-linux-getting-started.html#:~:text=If%20you%20are%20using%20such
1 parent 7dc0370 commit 71b2231

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Sources/Dependencies/DependencyValues.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ import IssueReporting
55
import WinSDK
66
#elseif canImport(Android)
77
import Android
8-
#elseif os(Linux)
8+
#elseif canImport(Glibc)
99
import Glibc
10+
#elseif canImport(Musl)
11+
import Musl
1012
#endif
1113
// WASI does not support dynamic linking
1214
#if os(WASI)

0 commit comments

Comments
 (0)