|
|
@@ -16,6 +16,8 @@
|
|
|
|
|
|
#if canImport(Darwin)
|
|
|
private import Darwin
|
|
|
+#elseif canImport(Android)
|
|
|
+private import Android // should be @usableFromInline
|
|
|
#elseif canImport(Glibc)
|
|
|
private import Glibc // should be @usableFromInline
|
|
|
#elseif canImport(Musl)
|
|
|
@@ -29,6 +31,9 @@ enum System {
|
|
|
#if canImport(Darwin)
|
|
|
let pid = Darwin.getpid()
|
|
|
return Int(pid)
|
|
|
+ #elseif canImport(Android)
|
|
|
+ let pid = Android.getpid()
|
|
|
+ return Int(pid)
|
|
|
#elseif canImport(Glibc)
|
|
|
let pid = Glibc.getpid()
|
|
|
return Int(pid)
|