mirror of
https://github.com/apple/swift-nio
synced 2026-11-24 04:37:54 +00:00
Only compile FileSystem on some platforms (#2636)
Motivation: SwiftNIO doesn't compile for visionOS because NIOFileSystem depends on Swift System which doesn't yet support visionOS. As NIOFileSystem isn't yet stable API we can define it out on some platforms. Modifications: - Only define NIOFileSystem on macOS, iOS, tvOS, watchOS, Linux and Android. - Only include Swift System on the same platforms Result: SwiftNIO compiles on visionOS, albeit without NIOFileSystem.
This commit is contained in:
1 parent
635b258949
commit
53965cc348
59 files changed
+151
-1
No files matched your search
@@ -12,6 +12,7 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(Linux) || os(Android)
|
||||
import NIOCore
|
||||
|
||||
@available(macOS 10.15, iOS 13.0, watchOS 6.0, tvOS 13.0, *)
|
||||
@@ -95,3 +96,5 @@ extension ByteBuffer {
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in new issue
Block a user