[PATCH v12 11/21] lib: Always set errno in hcreate_r