From 24062a2e0ad1e1ca306ab65d7ab80d6731e7decb Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Thu, 7 Nov 2024 16:20:24 -0800 Subject: [PATCH] ExampleSwiftLibrary: adjust imports for Windows Guard the `Darwin` import to when the module is available rather than assuming it to be the default. Add a case for Windows. --- Sources/ExampleSwiftLibrary/MySwiftLibrary.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Sources/ExampleSwiftLibrary/MySwiftLibrary.swift b/Sources/ExampleSwiftLibrary/MySwiftLibrary.swift index b5c8f5fd..36e09b14 100644 --- a/Sources/ExampleSwiftLibrary/MySwiftLibrary.swift +++ b/Sources/ExampleSwiftLibrary/MySwiftLibrary.swift @@ -19,7 +19,9 @@ #if os(Linux) import Glibc -#else +#elseif os(Windows) +import CRT +#elseif canImport(Darwin) import Darwin.C #endif