More changes to support building with Musl. (#2628)

Use direct syscall for `renameat2` because Musl doesn't include
a wrapper for it.  Similarly, define the constants ourselves.

Add Musl imports in relevant places.
This commit is contained in:
Alastair Houghton authored and GitHub committed 2024-01-18 07:44:33 -08:00
1 parent a0e0c68d71
commit c14d7d6c9e
13 files changed
+87 -31

No files matched your search

+3 -1
View File
@@ -20,6 +20,8 @@ import NIOCore
import Darwin
#elseif canImport(Glibc)
import Glibc
#elseif canImport(Musl)
import Musl
#endif
/// A file system which interacts with the local system. The file system uses a thread pool to
@@ -1146,7 +1148,7 @@ extension FileSystem {
location: .here()
)
}
#elseif canImport(Glibc)
#elseif canImport(Glibc) || canImport(Musl)
var offset = 0
while offset < sourceInfo.size {