Skip to content

Commit 3b6b97d

Browse files
authored
Add conditionals to unbreak building ToolsSupportCore for iOS (#241)
One availability conditional wasn't properly including the iOS platform, and another conditional caused an "implementation required" error. This restores the ability to build on iOS.
1 parent bf1df2e commit 3b6b97d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: Sources/TSCUtility/BitstreamReader.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ private struct BitstreamReader {
183183
if case .char6 = element {
184184
// FIXME: Once the minimum deployment target bumps to macOS 11, use
185185
// the more ergonomic stdlib API everywhere.
186-
if #available(macOS 11.0, *) {
186+
if #available(macOS 11.0, iOS 14.0, watchOS 7.0, tvOS 14.0, *) {
187187
payload = try .char6String(String(unsafeUninitializedCapacity: Int(length)) { buffer in
188188
for i in 0..<Int(length) {
189189
buffer[i] = try UInt8(readSingleAbbreviatedRecordOperand(element))

Diff for: Sources/TSCUtility/FSWatch.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ private protocol _FileWatcher {
9595
func stop()
9696
}
9797

98-
#if os(OpenBSD) || os(Windows)
98+
#if os(OpenBSD) || os(Windows) || os(iOS)
9999
extension FSWatch._WatcherDelegate: NoOpWatcherDelegate {}
100100
extension NoOpWatcher: _FileWatcher{}
101101
#elseif canImport(Glibc)
@@ -110,7 +110,7 @@ extension FSEventStream: _FileWatcher{}
110110

111111
// MARK:- inotify
112112

113-
#if os(OpenBSD) || os(Windows)
113+
#if os(OpenBSD) || os(Windows) || os(iOS)
114114

115115
public protocol NoOpWatcherDelegate {
116116
func pathsDidReceiveEvent(_ paths: [AbsolutePath])

0 commit comments

Comments
 (0)