I guess this will need similar fixup for errno.