From 4a2e245ad5169e0ef8befc4c1590d8cb6d548e73 Mon Sep 17 00:00:00 2001 From: finagolfin <finagolfin@tuta.io> Date: Wed, 17 Jul 2024 03:08:41 +0530 Subject: [PATCH] Import new Android overlay (#651) --- Sources/ArgumentParser/Utilities/Platform.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Sources/ArgumentParser/Utilities/Platform.swift b/Sources/ArgumentParser/Utilities/Platform.swift index a3593ccf4..97629e35d 100644 --- a/Sources/ArgumentParser/Utilities/Platform.swift +++ b/Sources/ArgumentParser/Utilities/Platform.swift @@ -26,6 +26,8 @@ import Darwin @preconcurrency import CRT #elseif canImport(WASILibc) @preconcurrency import WASILibc +#elseif canImport(Android) +@preconcurrency import Android #endif enum Platform {} @@ -95,6 +97,8 @@ extension Platform { ucrt._exit(code) #elseif canImport(WASILibc) WASILibc.exit(code) +#elseif canImport(Android) + Android.exit(code) #endif } } @@ -117,7 +121,7 @@ extension Platform { // MARK: Terminal size -#if canImport(Glibc) +#if canImport(Glibc) || canImport(Android) func ioctl(_ a: Int32, _ b: Int32, _ p: UnsafeMutableRawPointer) -> Int32 { ioctl(CInt(a), UInt(b), p) }