Move libc error handling to netsupport.