Skip to content

Commit

Permalink
Add support for Musl (#429)
Browse files Browse the repository at this point in the history
Change import to allow a choice between Glibc and Musl
musl pow ref: https://git.musl-libc.org/cgit/musl/tree/include/math.h
  • Loading branch information
arasan01 committed Sep 25, 2024
1 parent 53d8b3b commit 5e61aaf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Sources/Yams/Representer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 5e61aaf

Please sign in to comment.