Skip to content

Commit 2e0c72c

Browse files
committed
Import new Android overlay
1 parent d66d015 commit 2e0c72c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Sources/ArgumentParser/Utilities/Platform.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ import Darwin
2929
import CRT
3030
#elseif canImport(WASILibc)
3131
import WASILibc
32+
#elseif canImport(Android)
33+
import Android
3234
#endif
3335

3436
enum Platform {}
@@ -98,6 +100,8 @@ extension Platform {
98100
ucrt._exit(code)
99101
#elseif canImport(WASILibc)
100102
WASILibc.exit(code)
103+
#elseif canImport(Android)
104+
Android.exit(code)
101105
#endif
102106
}
103107
}
@@ -120,7 +124,7 @@ extension Platform {
120124

121125
// MARK: Terminal size
122126

123-
#if canImport(Glibc)
127+
#if canImport(Glibc) || canImport(Android)
124128
func ioctl(_ a: Int32, _ b: Int32, _ p: UnsafeMutableRawPointer) -> Int32 {
125129
ioctl(CInt(a), UInt(b), p)
126130
}

0 commit comments

Comments
 (0)