diff --git a/Sources/System/FileOperations.swift b/Sources/System/FileOperations.swift index 055daee..a8b107c 100644 --- a/Sources/System/FileOperations.swift +++ b/Sources/System/FileOperations.swift @@ -401,6 +401,7 @@ extension FileDescriptor { } #endif +#if !os(Windows) /*System 1.2.0, @available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *)*/ extension FileDescriptor { /// Truncate or extend the file referenced by this file descriptor. @@ -446,3 +447,4 @@ extension FileDescriptor { } } } +#endif diff --git a/Sources/System/Internals/WindowsSyscallAdapters.swift b/Sources/System/Internals/WindowsSyscallAdapters.swift index 13f42c9..36acace 100644 --- a/Sources/System/Internals/WindowsSyscallAdapters.swift +++ b/Sources/System/Internals/WindowsSyscallAdapters.swift @@ -105,11 +105,4 @@ internal func pwrite( return Int(nNumberOfBytesWritten) } -@inline(__always) -internal func ftruncate( - _ fd: Int32, - _ length: off_t -) -> Int32 { - _chsize_s(fd, numericCast(length)) -} #endif