Correct errno value to comply with SUSv3.