errno must be accessed by a macro from errno.h. This program was partially converted in it's initial commit, but the removal of errno declerations was incomplete.