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/rename.c: New file. * libc/sys/sysnecv850/Makefile.am (lib_a_SOURCES): Add rename.c * libc/sys/sysnecv850/Makefile.in: Regenerate. * libc/sys/sysnecv850/fstat.c (_fstat): Invoke trap for SYS_fstat. * libc/sys/sysnecv850/unlink.c (_unlink): Invoke trap for SYS_unlink.