Revert the previous patch and use the SHA2 version that was in bleeding instead,
but properly indented. Also try to mitigate a bogus strict-aliasing warning.
Mute harmless compiler warnings if MIN() already defined.