From 3f66dfbaf8601ac05d7ca5c8cfe7781c157e56b7 Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Thu, 5 Jan 2023 10:58:04 +0000 Subject: [PATCH] MachPort: fix build issues with Swift 5.7 It seems that `#if $MoveOnly` check has no effect on Swift 5.7, so we should check whether Swift 5.8 or later are available first. Resolves #117. --- Sources/System/MachPort.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/System/MachPort.swift b/Sources/System/MachPort.swift index 8e7f8cf..39fdd66 100644 --- a/Sources/System/MachPort.swift +++ b/Sources/System/MachPort.swift @@ -7,7 +7,7 @@ See https://swift.org/LICENSE.txt for license information */ -#if $MoveOnly && (os(macOS) || os(iOS) || os(watchOS) || os(tvOS)) +#if swift(>=5.8) && $MoveOnly && (os(macOS) || os(iOS) || os(watchOS) || os(tvOS)) import Darwin.Mach