Now all of the references to `_INET' are in the `Address-type hacking'
section where they belong. This should really have been done as part of
the IPv6 work, but unaccountably wasn't.
int socketpair(int pf, int ty, int proto, int *sk)
{
- if (pf == PF_INET) {
+ if (family_known_p(pf)) {
pf = PF_UNIX;
proto = 0;
}
{
struct sockaddr_un sun;
- if (to && to->sa_family == AF_INET) {
+ if (to && family_known_p(to->sa_family)) {
PRESERVING_ERRNO({
do_implicit_bind(sk, &to, &tolen, &sun);
});
const struct sockaddr *sa;
struct msghdr mymsg;
- if (msg->msg_name && SA(msg->msg_name)->sa_family == AF_INET) {
+ if (msg->msg_name && family_known_p(SA(msg->msg_name)->sa_family)) {
PRESERVING_ERRNO({
sa = SA(msg->msg_name);
mymsg = *msg;