From 420eb0775a6c89417fcb5416ce99a76616aa2a64 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 a3593ccf..97629e35 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) }