From a212bf9e8993fceccbca4ace7dc7902c7f1cd324 Mon Sep 17 00:00:00 2001 From: Tim De Jong Date: Thu, 2 Oct 2025 17:06:58 +0200 Subject: [PATCH] It should be canImport(Darwin) not os(Darwin) --- GRDB/Core/Support/CoreGraphics/CGFloat.swift | 2 +- GRDB/Core/Support/Foundation/URL.swift | 2 +- Tests/GRDBTests/CGFloatTests.swift | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/GRDB/Core/Support/CoreGraphics/CGFloat.swift b/GRDB/Core/Support/CoreGraphics/CGFloat.swift index 11487c6b4..99d615350 100644 --- a/GRDB/Core/Support/CoreGraphics/CGFloat.swift +++ b/GRDB/Core/Support/CoreGraphics/CGFloat.swift @@ -1,6 +1,6 @@ #if canImport(CoreGraphics) import CoreGraphics -#elseif !os(Darwin) +#elseif !canImport(Darwin) import Foundation #endif diff --git a/GRDB/Core/Support/Foundation/URL.swift b/GRDB/Core/Support/Foundation/URL.swift index d8a8b1c80..b3630b14a 100644 --- a/GRDB/Core/Support/Foundation/URL.swift +++ b/GRDB/Core/Support/Foundation/URL.swift @@ -6,7 +6,7 @@ extension NSURL: DatabaseValueConvertible { /// Returns a TEXT database value containing the absolute URL. public var databaseValue: DatabaseValue { - #if !os(Darwin) + #if !canImport(Darwin) absoluteString.databaseValue #else absoluteString?.databaseValue ?? .null diff --git a/Tests/GRDBTests/CGFloatTests.swift b/Tests/GRDBTests/CGFloatTests.swift index 3e0bd21c8..4c9ebd93b 100644 --- a/Tests/GRDBTests/CGFloatTests.swift +++ b/Tests/GRDBTests/CGFloatTests.swift @@ -3,7 +3,7 @@ import GRDB #if canImport(CoreGraphics) import CoreGraphics -#elseif !os(Darwin) +#elseif !canImport(Darwin) import Foundation #endif