File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Sources/SwiftDocCUtilities/Utility Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change 11/*
22 This source file is part of the Swift.org open source project
33
4- Copyright (c) 2021 Apple Inc. and the Swift project authors
4+ Copyright (c) 2021-2025 Apple Inc. and the Swift project authors
55 Licensed under Apache License v2.0 with Runtime Library Exception
66
77 See https://swift.org/LICENSE.txt for license information
@@ -20,8 +20,10 @@ public struct Signal {
2020 public static func on( _ signals: [ Int32 ] , callback: @convention ( c) @escaping ( Int32 ) -> Void ) {
2121 var signalAction = sigaction ( )
2222
23- #if os(Linux)
24- // This is where we get to use a triple underscore in a method name.
23+ // Different libraries name the `sigaction` fields and handler type differently.
24+ #if canImport(Musl)
25+ signalAction. __sa_handler = unsafeBitCast ( callback, to: sigaction. __Unnamed_union___sa_handler. self)
26+ #elseif os(Linux)
2527 signalAction. __sigaction_handler = unsafeBitCast ( callback, to: sigaction. __Unnamed_union___sigaction_handler. self)
2628 #elseif os(Android)
2729 signalAction. sa_handler = callback
You can’t perform that action at this time.
0 commit comments