Skip to content

Commit 61f9fa9

Browse files
committed
Import new Android overlay
1 parent 05fb1f1 commit 61f9fa9

File tree

4 files changed

+15
-0
lines changed

4 files changed

+15
-0
lines changed

Sources/System/Internals/CInterop.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ import Glibc
2020
import Musl
2121
#elseif canImport(WASILibc)
2222
import WASILibc
23+
#elseif canImport(Android)
24+
@_implementationOnly import CSystem
25+
import Android
2326
#else
2427
#error("Unsupported Platform")
2528
#endif

Sources/System/Internals/Constants.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ import Musl
2424
#elseif canImport(WASILibc)
2525
import CSystem
2626
import WASILibc
27+
#elseif canImport(Android)
28+
import Android
2729
#else
2830
#error("Unsupported Platform")
2931
#endif

Sources/System/Internals/Exports.swift

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ import Glibc
2525
import Musl
2626
#elseif canImport(WASILibc)
2727
import WASILibc
28+
#elseif canImport(Android)
29+
@_implementationOnly import CSystem
30+
import Android
2831
#else
2932
#error("Unsupported Platform")
3033
#endif
@@ -65,6 +68,11 @@ internal var system_errno: CInt {
6568
get { WASILibc.errno }
6669
set { WASILibc.errno = newValue }
6770
}
71+
#elseif canImport(Android)
72+
internal var system_errno: CInt {
73+
get { Android.errno }
74+
set { Android.errno = newValue }
75+
}
6876
#endif
6977

7078
// MARK: C stdlib decls

Sources/System/Internals/Syscalls.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ import Musl
1717
import WASILibc
1818
#elseif os(Windows)
1919
import ucrt
20+
#elseif canImport(Android)
21+
import Android
2022
#else
2123
#error("Unsupported Platform")
2224
#endif

0 commit comments

Comments
 (0)