Skip to content

Commit 1742cd4

Browse files
committed
more android fixes to simplify PR
1 parent f3e12fb commit 1742cd4

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

Sources/Foundation/Data.swift

+2
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,8 @@ internal func malloc_good_size(_ size: Int) -> Int {
6464
import Glibc
6565
#elseif canImport(Musl)
6666
import Musl
67+
#elseif canImport(Android)
68+
import Android
6769
#elseif canImport(WASILibc)
6870
import WASILibc
6971
#endif

Sources/Foundation/FileManager+POSIX.swift

-4
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@
1111
internal func &(left: UInt32, right: mode_t) -> mode_t {
1212
return mode_t(left) & right
1313
}
14-
#elseif os(Android)
15-
internal func &(left: mode_t, right: Int32) -> mode_t {
16-
return left & mode_t(right)
17-
}
1814
#endif
1915

2016
#if os(WASI)

Sources/Foundation/FileManager.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import WinSDK
2525
import WASILibc
2626
#endif
2727

28-
#if os(Android)
28+
#if canImport(Android)
2929
import Android
3030
#endif
3131

Sources/Foundation/Host.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@
1212
import WinSDK
1313
#endif
1414

15-
#if os(Android)
15+
#if canImport(Android)
1616
import Android
17-
// Android Glibc differs a little with respect to the Linux Glibc.
17+
// Android Bionic differs a little with respect to the Linux Glibc.
1818

1919
// IFF_LOOPBACK is part of the enumeration net_device_flags, which needs to
2020
// convert to UInt32.

0 commit comments

Comments
 (0)