From 294185a56135ec44d0ff8c710e269bfd6d1e9841 Mon Sep 17 00:00:00 2001 From: Adin Date: Fri, 24 Jul 2026 16:44:52 +0800 Subject: [PATCH] fix: use Android C library imports --- Source/CoreGraphicsPolyfill.swift | 4 +++- Source/Model/Primitives/SVGGradient.swift | 4 +++- Source/Parser/SVG/Primitives/SVGLengthParser.swift | 4 +++- Source/Parser/SVG/SVGParserPrimitives.swift | 4 +++- Source/Parser/SVG/SVGPathReader.swift | 4 +++- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/Source/CoreGraphicsPolyfill.swift b/Source/CoreGraphicsPolyfill.swift index 5ac489f..6b50b8e 100644 --- a/Source/CoreGraphicsPolyfill.swift +++ b/Source/CoreGraphicsPolyfill.swift @@ -15,7 +15,9 @@ import Foundation #if os(WASI) import WASILibc -#elseif os(Linux) || os(Android) +#elseif canImport(Android) +import Android +#elseif canImport(Glibc) import Glibc #endif diff --git a/Source/Model/Primitives/SVGGradient.swift b/Source/Model/Primitives/SVGGradient.swift index d88f361..61f7cc2 100644 --- a/Source/Model/Primitives/SVGGradient.swift +++ b/Source/Model/Primitives/SVGGradient.swift @@ -15,7 +15,9 @@ import Foundation #if os(WASI) import WASILibc -#elseif os(Linux) || os(Android) +#elseif canImport(Android) +import Android +#elseif canImport(Glibc) import Glibc #endif diff --git a/Source/Parser/SVG/Primitives/SVGLengthParser.swift b/Source/Parser/SVG/Primitives/SVGLengthParser.swift index 2b9f563..95cf7c8 100644 --- a/Source/Parser/SVG/Primitives/SVGLengthParser.swift +++ b/Source/Parser/SVG/Primitives/SVGLengthParser.swift @@ -13,7 +13,9 @@ import Foundation #if os(WASI) import WASILibc -#elseif os(Linux) || os(Android) +#elseif canImport(Android) +import Android +#elseif canImport(Glibc) import Glibc #endif diff --git a/Source/Parser/SVG/SVGParserPrimitives.swift b/Source/Parser/SVG/SVGParserPrimitives.swift index 84f17cc..6809ea9 100644 --- a/Source/Parser/SVG/SVGParserPrimitives.swift +++ b/Source/Parser/SVG/SVGParserPrimitives.swift @@ -15,7 +15,9 @@ import Foundation #if os(WASI) import WASILibc -#elseif os(Linux) || os(Android) +#elseif canImport(Android) +import Android +#elseif canImport(Glibc) import Glibc #endif diff --git a/Source/Parser/SVG/SVGPathReader.swift b/Source/Parser/SVG/SVGPathReader.swift index 48ab08c..f878f5d 100644 --- a/Source/Parser/SVG/SVGPathReader.swift +++ b/Source/Parser/SVG/SVGPathReader.swift @@ -15,7 +15,9 @@ public typealias MBezierPath = UIBezierPath import FoundationEssentials #if os(WASI) import WASILibc -#elseif os(Linux) || os(Android) +#elseif canImport(Android) +import Android +#elseif canImport(Glibc) import Glibc #endif #elseif os(WASI) || os(Linux) || os(Android)