diff --git a/pkgs/applications/science/math/gfan/default.nix b/pkgs/applications/science/math/gfan/default.nix index 11a42d1cfdf8..8fa6da16e336 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++" ];