Browse Source

work around itojun BSD IPV6_ONLY brokenness

master
Felix von Leitner 18 years ago
parent
commit
2bc46ea767
  1. 6
      socket/socket_tcp6.c
  2. 6
      socket/socket_udp6.c

6
socket/socket_tcp6.c

@ -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();

6
socket/socket_udp6.c

@ -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();

Loading…
Cancel
Save