fix xo_err
portable setting of errno