Kdiff3 has run into a compilation bug in boost-hearders 1.80 on MacOS std::unary_function and std::binary_function are no longer available in C++17 and C++20. They can be re-enabled by defining _LIBCPP_ENABLE_CXX17_REMOVED_UNARY_BINARY_FUNCTION. They are also marked as [[deprecated]] in C++11 and later. To disable deprecation warnings you have to define _LIBCPP_DISABLE_DEPRECATION_WARNINGS. Note that this disables all deprecation warnings.
This issue is fixed upstream as of 1.84 and possibly earlier. Should I update this library in cradt.