unix: Convert from AVERROR to errno range before comparing error codes