Add support for Musl libc (#103)

Since Musl is sufficiently different from Glibc (see https://wiki.musl-libc.org/functional-differences-from-glibc.html), it requires a different import, which now should be applied to files that have `import Glibc` in them.
This commit is contained in:
Max Desiatov authored and GitHub committed 2023-06-23 11:29:15 +01:00
1 parent 364b26d86d
commit 1beb546810
1 file changed
+4 -1
@@ -15,9 +15,12 @@
import Foundation
#if os(Windows)
import WinSDK
#elseif os(Linux) || os(Android)
#elseif canImport(Glibc)
import Glibc
import CoreFoundation
#elseif canImport(Musl)
import Musl
import CoreFoundation
#elseif canImport(Darwin)
import Darwin
#endif