From 8151541ddfd70d033f4cc64d4f3e0bf85ec5b02f Mon Sep 17 00:00:00 2001 From: Thomas Zoechling Date: Thu, 26 Dec 2024 11:27:41 +0100 Subject: [PATCH] Fix build for Swift versions < 6 --- Sources/ZIPFoundation/Archive+ZIP64.swift | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Sources/ZIPFoundation/Archive+ZIP64.swift b/Sources/ZIPFoundation/Archive+ZIP64.swift index 2925fbf9..2b519a1c 100644 --- a/Sources/ZIPFoundation/Archive+ZIP64.swift +++ b/Sources/ZIPFoundation/Archive+ZIP64.swift @@ -143,8 +143,13 @@ extension Archive.ZIP64EndOfCentralDirectory { } /// Properties that represent the maximum value of each field +#if swift(>=6.0) nonisolated(unsafe) var maxUInt32 = UInt32.max nonisolated(unsafe) var maxUInt16 = UInt16.max +#else +var maxUInt32 = UInt32.max +var maxUInt16 = UInt16.max +#endif var maxCompressedSize: UInt32 { maxUInt32 } var maxUncompressedSize: UInt32 { maxUInt32 }