Fix the errors/warnings on clang by segregating typedefs