upstream commit

make this slightly easier to diff against portable