Skip to content

Commit

Permalink
Merge pull request #187 from finagolfin/droid
Browse files Browse the repository at this point in the history
Import new Android overlay
  • Loading branch information
glessard authored Jul 9, 2024
2 parents 2ce971a + 02811ea commit 19e7f0f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Sources/System/Internals/CInterop.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions Sources/System/Internals/Constants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ import Musl
#elseif canImport(WASILibc)
import CSystem
import WASILibc
#elseif canImport(Android)
import Android
#else
#error("Unsupported Platform")
#endif
Expand Down
8 changes: 8 additions & 0 deletions Sources/System/Internals/Exports.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions Sources/System/Internals/Syscalls.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ import Musl
import WASILibc
#elseif os(Windows)
import ucrt
#elseif canImport(Android)
import Android
#else
#error("Unsupported Platform")
#endif
Expand Down

0 comments on commit 19e7f0f

Please sign in to comment.