mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-19 04:49:25 +08:00
* libc/rcmd.c: Enable IPv6.
This commit is contained in:
parent
7a2df116fc
commit
f1c6730ba3
@ -1,3 +1,7 @@
|
||||
2010-03-29 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* libc/rcmd.c: Enable IPv6.
|
||||
|
||||
2010-03-28 Christopher Faylor <me+cygwin@cgf.cx>
|
||||
|
||||
* fhandler.cc (fhandler_base::fstat): Set st_mtime to current time.
|
||||
|
@ -291,11 +291,9 @@ again:
|
||||
case AF_INET:
|
||||
aport = ntohs(((struct sockaddr_in *)&from)->sin_port);
|
||||
break;
|
||||
#ifdef INET6
|
||||
case AF_INET6:
|
||||
aport = ntohs(((struct sockaddr_in6 *)&from)->sin6_port);
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
aport = 0; /* error */
|
||||
break;
|
||||
@ -373,12 +371,10 @@ cygwin_rresvport_af(int *alport, int family)
|
||||
sport = &((struct sockaddr_in *)&ss)->sin_port;
|
||||
((struct sockaddr_in *)&ss)->sin_addr.s_addr = INADDR_ANY;
|
||||
break;
|
||||
#ifdef INET6
|
||||
case AF_INET6:
|
||||
sport = &((struct sockaddr_in6 *)&ss)->sin6_port;
|
||||
((struct sockaddr_in6 *)&ss)->sin6_addr = in6addr_any;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
errno = EAFNOSUPPORT;
|
||||
return -1;
|
||||
@ -586,7 +582,6 @@ __ivaliduser_af(FILE *hostf, const void *raddr, const char *luser,
|
||||
salen = sizeof(struct sockaddr_in);
|
||||
memcpy(&sin->sin_addr, raddr, sizeof(sin->sin_addr));
|
||||
break;
|
||||
#ifdef INET6
|
||||
case AF_INET6:
|
||||
if (len != sizeof(sin6->sin6_addr))
|
||||
return -1;
|
||||
@ -596,7 +591,6 @@ __ivaliduser_af(FILE *hostf, const void *raddr, const char *luser,
|
||||
salen = sizeof(struct sockaddr_in6);
|
||||
memcpy(&sin6->sin6_addr, raddr, sizeof(sin6->sin6_addr));
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user