Skip to content

Commit

Permalink
Changes to build with Musl. (#283)
Browse files Browse the repository at this point in the history
Added imports of Musl in a few places.  Also added definitions
for `systemStderr` and `systemStdout`.
  • Loading branch information
al45tair authored Dec 7, 2023
1 parent 4587ac5 commit e97a6fc
Show file tree
Hide file tree
Showing 3 changed files with 9 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(Musl)
import Musl
#else
#error("Unsupported runtime")
#endif
Expand Down
5 changes: 5 additions & 0 deletions Sources/Logging/Logging.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(Musl)
import Musl
#elseif canImport(WASILibc)
import WASILibc
#else
Expand Down Expand Up @@ -1251,6 +1253,9 @@ let systemStdout = CRT.stdout
#elseif canImport(Glibc)
let systemStderr = Glibc.stderr!
let systemStdout = Glibc.stdout!
#elseif canImport(Musl)
let systemStderr = Musl.stderr!
let systemStdout = Musl.stdout!
#elseif canImport(WASILibc)
let systemStderr = WASILibc.stderr!
let systemStdout = WASILibc.stdout!
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(Musl)
import Musl
#elseif canImport(WASILibc)
import WASILibc
#else
Expand Down

0 comments on commit e97a6fc

Please sign in to comment.