Add Musl import support for static linking
Some checks failed
CI / verify-linuxmain (push) Has been cancelled
CI / apple (macos-10.15, iOS) (push) Has been cancelled
CI / apple (macos-10.15, macOS) (push) Has been cancelled
CI / apple (macos-10.15, tvOS) (push) Has been cancelled
CI / apple (macos-10.15, watchOS) (push) Has been cancelled
CI / apple (macos-11, iOS) (push) Has been cancelled
CI / apple (macos-11, macOS) (push) Has been cancelled
CI / apple (macos-11, tvOS) (push) Has been cancelled
CI / apple (macos-11, watchOS) (push) Has been cancelled
CI / linux (swift:4.2) (push) Has been cancelled
CI / linux (swift:5.0) (push) Has been cancelled
CI / linux (swift:5.1) (push) Has been cancelled
CI / linux (swift:5.2) (push) Has been cancelled
CI / linux (swift:5.3) (push) Has been cancelled
CI / linux (swift:5.4) (push) Has been cancelled
CI / linux (swiftlang/swift:nightly-5.5) (push) Has been cancelled
Some checks failed
CI / verify-linuxmain (push) Has been cancelled
CI / apple (macos-10.15, iOS) (push) Has been cancelled
CI / apple (macos-10.15, macOS) (push) Has been cancelled
CI / apple (macos-10.15, tvOS) (push) Has been cancelled
CI / apple (macos-10.15, watchOS) (push) Has been cancelled
CI / apple (macos-11, iOS) (push) Has been cancelled
CI / apple (macos-11, macOS) (push) Has been cancelled
CI / apple (macos-11, tvOS) (push) Has been cancelled
CI / apple (macos-11, watchOS) (push) Has been cancelled
CI / linux (swift:4.2) (push) Has been cancelled
CI / linux (swift:5.0) (push) Has been cancelled
CI / linux (swift:5.1) (push) Has been cancelled
CI / linux (swift:5.2) (push) Has been cancelled
CI / linux (swift:5.3) (push) Has been cancelled
CI / linux (swift:5.4) (push) Has been cancelled
CI / linux (swiftlang/swift:nightly-5.5) (push) Has been cancelled
This commit is contained in:
@@ -1,6 +1,8 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
#if os(Linux)
|
#if canImport(Glibc)
|
||||||
import Glibc
|
import Glibc
|
||||||
|
#elseif canImport(Musl)
|
||||||
|
import Musl
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
public extension Pathish {
|
public extension Pathish {
|
||||||
|
|||||||
@@ -1,10 +1,13 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
#if !os(Linux)
|
#if canImport(Darwin)
|
||||||
import func Darwin.realpath
|
import func Darwin.realpath
|
||||||
let _realpath = Darwin.realpath
|
let _realpath = Darwin.realpath
|
||||||
#else
|
#elseif canImport(Glibc)
|
||||||
import func Glibc.realpath
|
import func Glibc.realpath
|
||||||
let _realpath = Glibc.realpath
|
let _realpath = Glibc.realpath
|
||||||
|
#elseif canImport(Musl)
|
||||||
|
import func Musl.realpath
|
||||||
|
let _realpath = Musl.realpath
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
public typealias PathStruct = Path
|
public typealias PathStruct = Path
|
||||||
|
|||||||
@@ -1,8 +1,10 @@
|
|||||||
import Foundation
|
import Foundation
|
||||||
#if os(Linux)
|
#if canImport(Darwin)
|
||||||
import func Glibc.access
|
|
||||||
#else
|
|
||||||
import Darwin
|
import Darwin
|
||||||
|
#elseif canImport(Glibc)
|
||||||
|
import func Glibc.access
|
||||||
|
#elseif canImport(Musl)
|
||||||
|
import func Musl.access
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
public extension Pathish {
|
public extension Pathish {
|
||||||
|
|||||||
Reference in New Issue
Block a user