MFC r258195+r264361:

nc from OpenBSD 5.5.