Skip to content
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

Import new Android overlay #477

Merged
merged 1 commit into from
Jul 5, 2024
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: 2 additions & 0 deletions Sources/TSCLibc/libc.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
#elseif os(Windows)
@_exported import CRT
@_exported import WinSDK
#elseif canImport(Android)
@_exported import Android
#else
@_exported import Darwin.C
#endif
Expand Down
6 changes: 3 additions & 3 deletions Sources/TSCUtility/FSWatch.swift
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public class FSWatch {
self._watcher = NoOpWatcher(paths: paths, latency: latency, delegate: _WatcherDelegate(block: block))
#elseif os(Windows)
self._watcher = RDCWatcher(paths: paths, latency: latency, delegate: _WatcherDelegate(block: block))
#elseif canImport(Glibc) || canImport(Musl)
#elseif canImport(Glibc) || canImport(Musl) || canImport(Android)
var ipaths: [AbsolutePath: Inotify.WatchOptions] = [:]

// FIXME: We need to recurse here.
Expand Down Expand Up @@ -106,7 +106,7 @@ extension NoOpWatcher: _FileWatcher{}
#elseif os(Windows)
extension FSWatch._WatcherDelegate: RDCWatcherDelegate {}
extension RDCWatcher: _FileWatcher {}
#elseif canImport(Glibc) || canImport(Musl)
#elseif canImport(Glibc) || canImport(Musl) || canImport(Android)
extension FSWatch._WatcherDelegate: InotifyDelegate {}
extension Inotify: _FileWatcher{}
#elseif os(macOS)
Expand Down Expand Up @@ -296,7 +296,7 @@ public final class RDCWatcher {
}
}

#elseif canImport(Glibc) || canImport(Musl)
#elseif canImport(Glibc) || canImport(Musl) || canImport(Android)

/// The delegate for receiving inotify events.
public protocol InotifyDelegate {
Expand Down
2 changes: 1 addition & 1 deletion Sources/TSCUtility/Tracing.swift
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public struct TracingEvent: TracingEventProtocol, Codable, Sendable {
self.ts = ts
self.startTs = startTs
}
#elseif canImport(Glibc)
#elseif canImport(Glibc) || canImport(Android)
public init(
cat: String,
name: String,
Expand Down