Merge "Set errno for all error return cases."