1212//
1313//===----------------------------------------------------------------------===//
1414
15- #if canImport(Synchronization )
15+ #if compiler(>=6.0 )
1616import Synchronization
17- #endif // canImport(Synchronization )
17+ #endif // compiler(>=6.0 )
1818
1919/// A collection of HTTP fields. It is used in `HTTPRequest` and `HTTPResponse`, and can also be
2020/// used as HTTP trailer fields.
@@ -109,7 +109,7 @@ public struct HTTPFields: Sendable, Hashable {
109109 }
110110 }
111111
112- #if canImport(Synchronization )
112+ #if compiler(>=6.0 )
113113 @available ( macOS 15 . 0 , iOS 18 . 0 , watchOS 11 . 0 , tvOS 18 . 0 , visionOS 2 . 0 , * )
114114 private final class _StorageWithMutex : _Storage , @unchecked Sendable {
115115 let mutex = Mutex < Void > ( ( ) )
@@ -120,7 +120,7 @@ public struct HTTPFields: Sendable, Hashable {
120120 }
121121 }
122122 }
123- #endif // canImport(Synchronization )
123+ #endif // compiler(>=6.0 )
124124
125125 private final class _StorageWithNIOLock : _Storage , @unchecked Sendable {
126126 let lock = LockStorage . create ( value: ( ) )
@@ -133,15 +133,15 @@ public struct HTTPFields: Sendable, Hashable {
133133 }
134134
135135 private var _storage = {
136- #if canImport(Synchronization )
136+ #if compiler(>=6.0 )
137137 if #available( macOS 15 . 0 , iOS 18 . 0 , watchOS 11 . 0 , tvOS 18 . 0 , visionOS 2 . 0 , * ) {
138138 _StorageWithMutex ( )
139139 } else {
140140 _StorageWithNIOLock ( )
141141 }
142- #else // canImport(Synchronization )
142+ #else // compiler(>=6.0 )
143143 _StorageWithNIOLock ( )
144- #endif // canImport(Synchronization )
144+ #endif // compiler(>=6.0 )
145145 } ( )
146146
147147 /// Create an empty list of HTTP fields
0 commit comments