diff --git a/Sources/System/Internals/CInterop.swift b/Sources/System/Internals/CInterop.swift index 19cf4d56..80d37d05 100644 --- a/Sources/System/Internals/CInterop.swift +++ b/Sources/System/Internals/CInterop.swift @@ -20,6 +20,9 @@ import Glibc import Musl #elseif canImport(WASILibc) import WASILibc +#elseif canImport(Bionic) +@_implementationOnly import CSystem +import Bionic #else #error("Unsupported Platform") #endif diff --git a/Sources/System/Internals/Constants.swift b/Sources/System/Internals/Constants.swift index 27a145f7..904e5b22 100644 --- a/Sources/System/Internals/Constants.swift +++ b/Sources/System/Internals/Constants.swift @@ -24,6 +24,8 @@ import Musl #elseif canImport(WASILibc) import CSystem import WASILibc +#elseif canImport(Android) +import Android #else #error("Unsupported Platform") #endif diff --git a/Sources/System/Internals/Exports.swift b/Sources/System/Internals/Exports.swift index f4358c5b..d18102a2 100644 --- a/Sources/System/Internals/Exports.swift +++ b/Sources/System/Internals/Exports.swift @@ -25,6 +25,9 @@ import Glibc import Musl #elseif canImport(WASILibc) import WASILibc +#elseif canImport(Android) +@_implementationOnly import CSystem +import Android #else #error("Unsupported Platform") #endif @@ -65,6 +68,11 @@ internal var system_errno: CInt { get { WASILibc.errno } set { WASILibc.errno = newValue } } +#elseif canImport(Android) +internal var system_errno: CInt { + get { Android.errno } + set { Android.errno = newValue } +} #endif // MARK: C stdlib decls diff --git a/Sources/System/Internals/Syscalls.swift b/Sources/System/Internals/Syscalls.swift index f40b1685..6f885be5 100644 --- a/Sources/System/Internals/Syscalls.swift +++ b/Sources/System/Internals/Syscalls.swift @@ -17,6 +17,8 @@ import Musl import WASILibc #elseif os(Windows) import ucrt +#elseif canImport(Android) +import Android #else #error("Unsupported Platform") #endif