[PATCH] Fix some C++ build issues.