From 2e0c72c43070559e199f5cde341308b5df405171 Mon Sep 17 00:00:00 2001 From: Finagolfin Date: Thu, 4 Jul 2024 23:57:25 +0530 Subject: [PATCH] Import new Android overlay --- 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 20c5926d..1e792189 100644 --- a/Sources/ArgumentParser/Utilities/Platform.swift +++ b/Sources/ArgumentParser/Utilities/Platform.swift @@ -29,6 +29,8 @@ import Darwin import CRT #elseif canImport(WASILibc) import WASILibc +#elseif canImport(Android) +import Android #endif enum Platform {} @@ -98,6 +100,8 @@ extension Platform { ucrt._exit(code) #elseif canImport(WASILibc) WASILibc.exit(code) +#elseif canImport(Android) + Android.exit(code) #endif } } @@ -120,7 +124,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) }