gfan: fix clang build

Internal logging macro shadows std's `log2`, so we rename it.
This commit is contained in:
George Huebner 2024-03-14 23:12:39 -04:00
parent 69c71fc683
commit 909b7ce7bb
No known key found for this signature in database

View File

@ -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++" ];