Sync with r330070 from ports.