fix build of clang
sync with unstable
up to 3.15.8
up to 2.7.8