fix clang compilation errors