diff options
author | George Huebner <george@feyor.sh> | 2024-03-14 23:12:39 -0400 |
---|---|---|
committer | George Huebner <george@feyor.sh> | 2024-03-21 19:33:59 -0500 |
commit | 909b7ce7bb691d52e4894c1f21606064171643de (patch) | |
tree | 83db439683b9d865776e315956343c7c1b51bebb /pkgs/applications/science/math/gfan/default.nix | |
parent | 69c71fc6835785ffef9e5ebe05abf4485ee3819c (diff) |
gfan: fix clang build
Internal logging macro shadows std's `log2`, so we rename it.
Diffstat (limited to 'pkgs/applications/science/math/gfan/default.nix')
-rw-r--r-- | pkgs/applications/science/math/gfan/default.nix | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/pkgs/applications/science/math/gfan/default.nix b/pkgs/applications/science/math/gfan/default.nix index 11a42d1cfdf8a..8fa6da16e336b 100644 --- a/pkgs/applications/science/math/gfan/default.nix +++ b/pkgs/applications/science/math/gfan/default.nix @@ -14,6 +14,10 @@ stdenv.mkDerivation rec { postPatch = lib.optionalString stdenv.cc.isClang '' substituteInPlace Makefile --replace "-fno-guess-branch-probability" "" + + for f in $(find -name "*.h" -or -name "*.cpp"); do + substituteInPlace "$f" --replace-quiet "log2" "_log2" + done ''; buildFlags = [ "CC=${stdenv.cc.targetPrefix}cc" "CXX=${stdenv.cc.targetPrefix}c++" ]; |