I've had this lying around for probably a year or two at this point. It just changes all the instance of "errno" from a common symbol to an extern. I can't offhand recall where the actual definition is, but it certainly exists in the generic code.
* libc/sys/sysnecv850/isatty.c (_isatty): Renamed from isatty.