work around itojun BSD IPV6_ONLY brokenness

master
leitner 22 years ago
parent f6b5de0c93
commit 2af3efb074

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

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

Loading…
Cancel
Save