Skip to content

Commit e97a6fc

Browse files
authored
Changes to build with Musl. (#283)
Added imports of Musl in a few places. Also added definitions for `systemStderr` and `systemStdout`.
1 parent 4587ac5 commit e97a6fc

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

Sources/Logging/Locks.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ import Darwin
3434
import WinSDK
3535
#elseif canImport(Glibc)
3636
import Glibc
37+
#elseif canImport(Musl)
38+
import Musl
3739
#else
3840
#error("Unsupported runtime")
3941
#endif

Sources/Logging/Logging.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ import Darwin
1818
import CRT
1919
#elseif canImport(Glibc)
2020
import Glibc
21+
#elseif canImport(Musl)
22+
import Musl
2123
#elseif canImport(WASILibc)
2224
import WASILibc
2325
#else
@@ -1251,6 +1253,9 @@ let systemStdout = CRT.stdout
12511253
#elseif canImport(Glibc)
12521254
let systemStderr = Glibc.stderr!
12531255
let systemStdout = Glibc.stdout!
1256+
#elseif canImport(Musl)
1257+
let systemStderr = Musl.stderr!
1258+
let systemStdout = Musl.stdout!
12541259
#elseif canImport(WASILibc)
12551260
let systemStderr = WASILibc.stderr!
12561261
let systemStdout = WASILibc.stdout!

Sources/Logging/MetadataProvider.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ import Darwin
1818
import CRT
1919
#elseif canImport(Glibc)
2020
import Glibc
21+
#elseif canImport(Musl)
22+
import Musl
2123
#elseif canImport(WASILibc)
2224
import WASILibc
2325
#else

0 commit comments

Comments
 (0)