Log Message: Merge 70d85407771c2f89cde9de66a267225dfa18653a from upstream: Use types consistent with the prototypes in the header.