In r361752 the connect() call for TCP/IPv4 was changed in a way that using INADDR_ANY or INADDR_BROADCAST results in a failure indicating EAFNOSUPPORT. Using these addresses does not make sense, since 0.0.0.0 is not allowed as a destination address for IPv4 packets on the wire and TCP does not support multicast.
However, this change breaks backwards compatibility, since FreeBSD supports using INADDR_ANY by mapping it in in_pcbconnect_setup() (see in_pcb.c:1335) to the primary local address.
Two people reported this regression reporting that they use 0.0.0.0 as destination address. Therefore, this change is to re-allow INADDR_ANY as the destination address used in connnect() calls for TCP sockets. This also makes IPv4 and IPv6 behaviour more consistent, since IPv6 maps ::0 to ::1 when connecting.