swift-otel
swift-otel copied to clipboard
Support Musl
trafficstars
Getting errors when trying to make build with static linked SDK following this guide and getting error:
.build/checkouts/swift-otel/Sources/OTel/Configuration/OTelEnvironment.swift:15:12: error: no such module 'Glibc'
13 |
14 | #if os(Linux)
15 | import Glibc
| `- error: no such module 'Glibc'
16 | #else
17 | import Darwin.C
From the above guide, the code should be something like this
#if os(macOS) || os(iOS)
import Darwin
#elseif canImport(Glibc)
import Glibc
#elseif canImport(Musl)
import Musl
#elseif os(Windows)
import ucrt
#else
#error(Unknown platform)
#endif