From 79b7490ae91cdc10e994ef434512d50e1f131979 Mon Sep 17 00:00:00 2001 From: Guillaume Lessard Date: Fri, 7 Aug 2026 15:43:00 -0700 Subject: [PATCH] =?UTF-8?q?Hoist=20=E2=80=9Cimport=20CSystem=E2=80=9D=20ab?= =?UTF-8?q?ove=20the=20platform-specific=20imports?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Sources/System/FilePath/FilePathTempPosix.swift | 5 +---- Sources/System/Internals/Constants.swift | 3 +-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Sources/System/FilePath/FilePathTempPosix.swift b/Sources/System/FilePath/FilePathTempPosix.swift index 9e44836..942b211 100644 --- a/Sources/System/FilePath/FilePathTempPosix.swift +++ b/Sources/System/FilePath/FilePathTempPosix.swift @@ -9,19 +9,16 @@ #if !os(Windows) +import CSystem #if SYSTEM_PACKAGE_DARWIN import Darwin #elseif canImport(Glibc) -import CSystem import Glibc #elseif canImport(Musl) -import CSystem import Musl #elseif canImport(WASILibc) -import CSystem import WASILibc #elseif canImport(Android) -import CSystem import Android #else #error("Unsupported Platform") diff --git a/Sources/System/Internals/Constants.swift b/Sources/System/Internals/Constants.swift index 656e2c3..7a2ad9a 100644 --- a/Sources/System/Internals/Constants.swift +++ b/Sources/System/Internals/Constants.swift @@ -11,6 +11,7 @@ // they can be used anywhere without imports and without confusion to // unavailable local decls. +import CSystem #if SYSTEM_PACKAGE_DARWIN import Darwin #elseif os(Windows) @@ -27,8 +28,6 @@ import Android #error("Unsupported Platform") #endif -import CSystem - // MARK: errno #if SYSTEM_PACKAGE_DARWIN @_alwaysEmitIntoClient