Skip to content

Commit

Permalink
add android support (#325)
Browse files Browse the repository at this point in the history
  • Loading branch information
hyp authored Sep 30, 2024
1 parent 2cb03fa commit d032056
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Sources/Logging/Locks.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ import Darwin
import WinSDK
#elseif canImport(Glibc)
import Glibc
#elseif canImport(Android)
import Android
#elseif canImport(Musl)
import Musl
#else
Expand Down
6 changes: 6 additions & 0 deletions Sources/Logging/Logging.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import CRT
#else
import Glibc
#endif
#elseif canImport(Android)
import Android
#elseif canImport(Musl)
import Musl
#elseif canImport(WASILibc)
Expand Down Expand Up @@ -1094,6 +1096,8 @@ internal struct StdioOutputStream: TextOutputStream, @unchecked Sendable {
let systemStderr = CRT.stderr
#elseif canImport(Glibc)
let systemStderr = Glibc.stderr!
#elseif canImport(Android)
let systemStderr = Android.stderr
#elseif canImport(Musl)
let systemStderr = Musl.stderr!
#elseif canImport(WASILibc)
Expand All @@ -1112,6 +1116,8 @@ internal struct StdioOutputStream: TextOutputStream, @unchecked Sendable {
let systemStdout = CRT.stdout
#elseif canImport(Glibc)
let systemStdout = Glibc.stdout!
#elseif canImport(Android)
let systemStdout = Android.stdout
#elseif canImport(Musl)
let systemStdout = Musl.stdout!
#elseif canImport(WASILibc)
Expand Down
2 changes: 2 additions & 0 deletions Sources/Logging/MetadataProvider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ import Darwin
import CRT
#elseif canImport(Glibc)
import Glibc
#elseif canImport(Android)
import Android
#elseif canImport(Musl)
import Musl
#elseif canImport(WASILibc)
Expand Down

0 comments on commit d032056

Please sign in to comment.