work around itojun BSD IPV6_ONLY brokenness

This commit is contained in:
Felix von Leitner 2003-10-06 18:16:38 +00:00
parent 9779356803
commit 2bc46ea767
2 changed files with 12 additions and 0 deletions

View File

@ -25,6 +25,12 @@ compat:
} else
return -1;
}
#ifdef IPV6_V6ONLY
{
int zero=0;
setsockopt(s,IPPROTO_IPV6,IPV6_V6ONLY,(void*)&zero,sizeof(zero));
}
#endif
return s;
#else
return socket_tcp4();

View File

@ -25,6 +25,12 @@ compat:
} else
return -1;
}
#ifdef IPV6_V6ONLY
{
int zero=0;
setsockopt(s,IPPROTO_IPV6,IPV6_V6ONLY,(void*)&zero,sizeof(zero));
}
#endif
return s;
#else
return socket_udp();