fix the errno of st_read.