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:
George Barnett authored and GitHub committed 2024-02-01 13:24:21 +00:00
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