Skip to content

Commit

Permalink
Support compiling against Musl (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
simonjbeaumont authored May 8, 2024
1 parent 877d749 commit 12a031b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Sources/ConcurrencyHelpers/Lock.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@ import Darwin
#elseif os(Windows)
import ucrt
import WinSDK
#else
#elseif canImport(Glibc)
import Glibc
#elseif canImport(Musl)
import Musl
#endif

#if os(Windows)
Expand Down
2 changes: 2 additions & 0 deletions Sources/UnixSignals/UnixSignal.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
import Darwin
#elseif canImport(Glibc)
import Glibc
#elseif canImport(Musl)
import Musl
#endif
import Dispatch

Expand Down
3 changes: 3 additions & 0 deletions Sources/UnixSignals/UnixSignalsSequence.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ import Dispatch
#elseif canImport(Glibc)
@preconcurrency import Dispatch
import Glibc
#elseif canImport(Musl)
@preconcurrency import Dispatch
import Musl
#endif
import ConcurrencyHelpers

Expand Down
2 changes: 2 additions & 0 deletions Tests/UnixSignalsTests/UnixSignalTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import XCTest
import Darwin
#elseif canImport(Glibc)
import Glibc
#elseif canImport(Musl)
import Musl
#endif

final class UnixSignalTests: XCTestCase {
Expand Down

0 comments on commit 12a031b

Please sign in to comment.