- use <stdarg.h> instead of <varargs.h>
- don't declare errno assuming nicluding <errno.h> is sufficient.
- check strerror(3) and don't use own alternative one.
ftp://ftp.netbsd.org/pub/NetBSD/security/patches/SA2001-012-telnetd.patch
see also
ftp://ftp.netbsd.org/pub/NetBSD/security/advisories/NetBSD-SA2001-012.txt.asc