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 56ca4dc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@

##### Enhancements

* None.
* Add support for Musl(Static Linux SDK).
[arasan01](http://github.com/arasan01)
[#429](https://github.com/jpsim/Yams/issues/429)

##### Bug Fixes

Expand Down
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 56ca4dc

Please sign in to comment.