Skip to content

Commit de1ef4b

Browse files
authored
Use #if canImport(Darwin) where possible (#144)
1 parent cf346f7 commit de1ef4b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Sources/ConcurrencyHelpers/Lock.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
//
2727
//===----------------------------------------------------------------------===//
2828

29-
#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS)
29+
#if canImport(Darwin)
3030
import Darwin
3131
#elseif os(Windows)
3232
import ucrt

Sources/UnixSignals/UnixSignalsSequence.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ extension UnixSignalsSequence {
7373

7474
init(signals: Set<UnixSignal>) async {
7575
let sources: [Source] = signals.map { sig in
76-
#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS)
76+
#if canImport(Darwin)
7777
// On Darwin platforms Dispatch's signal source uses kqueue and EVFILT_SIGNAL for
7878
// delivering signals. This exists alongside but with lower precedence than signal and
7979
// sigaction: ignore signal handling here to kqueue can deliver signals.

0 commit comments

Comments
 (0)