Skip to content

Commit db56adf

Browse files
finagolfinbnbarham
authored andcommitted
Import new Android overlay (#477)
1 parent 930e82e commit db56adf

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

Diff for: Sources/TSCLibc/libc.swift

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
#elseif os(Windows)
1616
@_exported import CRT
1717
@_exported import WinSDK
18+
#elseif canImport(Android)
19+
@_exported import Android
1820
#else
1921
@_exported import Darwin.C
2022
#endif

Diff for: Sources/TSCUtility/FSWatch.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public class FSWatch {
5454
self._watcher = NoOpWatcher(paths: paths, latency: latency, delegate: _WatcherDelegate(block: block))
5555
#elseif os(Windows)
5656
self._watcher = RDCWatcher(paths: paths, latency: latency, delegate: _WatcherDelegate(block: block))
57-
#elseif canImport(Glibc) || canImport(Musl)
57+
#elseif canImport(Glibc) || canImport(Musl) || canImport(Android)
5858
var ipaths: [AbsolutePath: Inotify.WatchOptions] = [:]
5959

6060
// FIXME: We need to recurse here.
@@ -106,7 +106,7 @@ extension NoOpWatcher: _FileWatcher{}
106106
#elseif os(Windows)
107107
extension FSWatch._WatcherDelegate: RDCWatcherDelegate {}
108108
extension RDCWatcher: _FileWatcher {}
109-
#elseif canImport(Glibc) || canImport(Musl)
109+
#elseif canImport(Glibc) || canImport(Musl) || canImport(Android)
110110
extension FSWatch._WatcherDelegate: InotifyDelegate {}
111111
extension Inotify: _FileWatcher{}
112112
#elseif os(macOS)
@@ -296,7 +296,7 @@ public final class RDCWatcher {
296296
}
297297
}
298298

299-
#elseif canImport(Glibc) || canImport(Musl)
299+
#elseif canImport(Glibc) || canImport(Musl) || canImport(Android)
300300

301301
/// The delegate for receiving inotify events.
302302
public protocol InotifyDelegate {

Diff for: Sources/TSCUtility/Tracing.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public struct TracingEvent: TracingEventProtocol, Codable, Sendable {
9292
self.ts = ts
9393
self.startTs = startTs
9494
}
95-
#elseif canImport(Glibc)
95+
#elseif canImport(Glibc) || canImport(Android)
9696
public init(
9797
cat: String,
9898
name: String,

0 commit comments

Comments
 (0)