Fix errno comparison