mirror of
https://github.com/apple/swift-system
synced 2026-11-26 04:57:54 +00:00
fix(MachPort): silence concurrency check for mach_task_self_ (#379)
Darwin.Mach's mach_task_self_ is a shared global; Swift 6.3 reports it as not concurrency-safe when imported. Use a preconcurrency import for older Darwin SDKs. Fixes #373 Co-authored-by: Guillaume Lessard <guillaume.lessard@apple.com>
This commit is contained in:
1 parent
5c2854d7bd
commit
869129b7bf
1 file changed
+4
@@ -9,7 +9,11 @@
|
||||
|
||||
#if SYSTEM_PACKAGE_DARWIN
|
||||
|
||||
#if canImport(Darwin, _version: 310)
|
||||
import Darwin.Mach
|
||||
#else
|
||||
@preconcurrency import Darwin.Mach
|
||||
#endif
|
||||
|
||||
@available(System 1.4.0, *)
|
||||
public protocol MachPortRight {}
|
||||
|
||||
Reference in new issue
Block a user