use num_errno instead of sizeof().