errno for 0.8.x and 0.10.x

as suggested by @ronkorving