Reviewing Vapor's codebase we have several files where we do:
#if canImport(Glibc)
import Glibc
#elseif canImport(Musl)
import Musl
#elseif canImport(Android)
import Android
#else
import Darwin.C
#endif
Which does feel like there should be something higher level just to call down to some fairly simple C APIs or offer a better abstraction on top. (It feels like Swift System should be this but the guidance isn't particularly clear and it obiously doesn't cover everything we use