declaration fixes for clang compatibility