Skip to content

Commit 420eb07

Browse files
committed
Import new Android overlay
1 parent bb10ca8 commit 420eb07

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
@@ -26,6 +26,8 @@ import Darwin
2626
@preconcurrency import CRT
2727
#elseif canImport(WASILibc)
2828
@preconcurrency import WASILibc
29+
#elseif canImport(Android)
30+
@preconcurrency import Android
2931
#endif
3032

3133
enum Platform {}
@@ -95,6 +97,8 @@ extension Platform {
9597
ucrt._exit(code)
9698
#elseif canImport(WASILibc)
9799
WASILibc.exit(code)
100+
#elseif canImport(Android)
101+
Android.exit(code)
98102
#endif
99103
}
100104
}
@@ -117,7 +121,7 @@ extension Platform {
117121

118122
// MARK: Terminal size
119123

120-
#if canImport(Glibc)
124+
#if canImport(Glibc) || canImport(Android)
121125
func ioctl(_ a: Int32, _ b: Int32, _ p: UnsafeMutableRawPointer) -> Int32 {
122126
ioctl(CInt(a), UInt(b), p)
123127
}

0 commit comments

Comments
 (0)