bsd sometimes need length of sockaddr_* types set correctly, so fork from linux ones