|
|
@ -11,6 +11,9 @@
|
|
|
|
#ifndef EAFNOSUPPORT
|
|
|
|
#ifndef EAFNOSUPPORT
|
|
|
|
#define EAFNOSUPPORT EINVAL
|
|
|
|
#define EAFNOSUPPORT EINVAL
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef EPFNOSUPPORT
|
|
|
|
|
|
|
|
#define EPFNOSUPPORT EAFNOSUPPORT
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
int socket_udp6(void)
|
|
|
|
int socket_udp6(void)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -21,7 +24,7 @@ int socket_udp6(void)
|
|
|
|
if (noipv6) goto compat;
|
|
|
|
if (noipv6) goto compat;
|
|
|
|
s = winsock2errno(socket(PF_INET6,SOCK_DGRAM,0));
|
|
|
|
s = winsock2errno(socket(PF_INET6,SOCK_DGRAM,0));
|
|
|
|
if (s == -1) {
|
|
|
|
if (s == -1) {
|
|
|
|
if (errno == EINVAL || errno == EAFNOSUPPORT) {
|
|
|
|
if (errno == EINVAL || errno == EAFNOSUPPORT || errno == EPFNOSUPPORT) {
|
|
|
|
compat:
|
|
|
|
compat:
|
|
|
|
s=winsock2errno(socket(AF_INET,SOCK_DGRAM,0));
|
|
|
|
s=winsock2errno(socket(AF_INET,SOCK_DGRAM,0));
|
|
|
|
noipv6=1;
|
|
|
|
noipv6=1;
|
|
|
|