Skip to content

Commit

Permalink
Import new Android overlay (#477)
Browse files Browse the repository at this point in the history
  • Loading branch information
finagolfin authored Jul 5, 2024
1 parent 4efd5a7 commit 15fafa7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
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

0 comments on commit 15fafa7

Please sign in to comment.