From bdfeb29148b1c9aa63e4bed602737a88ef84e356 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Tue, 16 Mar 2021 18:24:59 -0700 Subject: [PATCH] Internals: adjust the definition of `CInterop.Mode` for Windows (#36) Windows does not have a `mode_t` type, instead it uses `int` as a stand in. Adjust the type alias to reflect this. --- Sources/System/Internals/CInterop.swift | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Sources/System/Internals/CInterop.swift b/Sources/System/Internals/CInterop.swift index 892a2d9..7f3b96d 100644 --- a/Sources/System/Internals/CInterop.swift +++ b/Sources/System/Internals/CInterop.swift @@ -29,7 +29,11 @@ import ucrt /// A namespace for C and platform types // @available(macOS 9999, iOS 9999, watchOS 9999, tvOS 9999, *) public enum CInterop { +#if os(Windows) + public typealias Mode = CInt +#else public typealias Mode = mode_t +#endif /// The C `char` type public typealias Char = CChar