From 5e61aaf8c6089fe8988fbd6e587c78c5b3e61386 Mon Sep 17 00:00:00 2001 From: arayama-kyo Date: Wed, 25 Sep 2024 19:34:30 +0900 Subject: [PATCH] Add support for Musl (#429) Change import to allow a choice between Glibc and Musl musl pow ref: https://git.musl-libc.org/cgit/musl/tree/include/math.h --- Sources/Yams/Representer.swift | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Sources/Yams/Representer.swift b/Sources/Yams/Representer.swift index 70310ff8..6cd61551 100644 --- a/Sources/Yams/Representer.swift +++ b/Sources/Yams/Representer.swift @@ -18,10 +18,14 @@ private let cpow: (_: Double, _: Double) -> Double = ucrt.pow import CoreFoundation import Bionic private let cpow: (_: Double, _: Double) -> Double = Bionic.pow -#else +#elseif canImport(Glibc) import CoreFoundation import Glibc private let cpow: (_: Double, _: Double) -> Double = Glibc.pow +#elseif canImport(Musl) +import CoreFoundation +import Musl +private let cpow: (_: Double, _: Double) -> Double = Musl.pow #endif public extension Node {