Skip to content

Add conditionals to unbreak building ToolsSupportCore for iOS #241

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Sources/TSCUtility/BitstreamReader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ private struct BitstreamReader {
if case .char6 = element {
// FIXME: Once the minimum deployment target bumps to macOS 11, use
// the more ergonomic stdlib API everywhere.
if #available(macOS 11.0, *) {
if #available(macOS 11.0, iOS 14.0, watchOS 7.0, tvOS 14.0, *) {
payload = try .char6String(String(unsafeUninitializedCapacity: Int(length)) { buffer in
for i in 0..<Int(length) {
buffer[i] = try UInt8(readSingleAbbreviatedRecordOperand(element))
Expand Down
4 changes: 2 additions & 2 deletions Sources/TSCUtility/FSWatch.swift
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ private protocol _FileWatcher {
func stop()
}

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

// MARK:- inotify

#if os(OpenBSD) || os(Windows)
#if os(OpenBSD) || os(Windows) || os(iOS)

public protocol NoOpWatcherDelegate {
func pathsDidReceiveEvent(_ paths: [AbsolutePath])
Expand Down