posix: sockets: use correct datatypes for in6_addr

in6addr_any and in6addr_loopback are of type in6_addr
This commit is contained in:
Oleg Hahm 2015-10-27 00:03:16 +01:00
parent de539fa54f
commit a0dcbc6a3c
2 changed files with 4 additions and 6 deletions

View File

@ -257,12 +257,12 @@ struct ipv6_mreq {
/** /**
* IPv6 socket address for the wildcard address. * IPv6 socket address for the wildcard address.
*/ */
extern const struct sockaddr_in6 in6addr_any; extern const struct in6_addr in6addr_any;
/** /**
* IPv6 socket address for the loopback address. * IPv6 socket address for the loopback address.
*/ */
extern const struct sockaddr_in6 in6addr_loopback; extern const struct in6_addr in6addr_loopback;
#ifdef __cplusplus #ifdef __cplusplus
} }

View File

@ -61,10 +61,8 @@ typedef struct {
socket_t _pool[SOCKET_POOL_SIZE]; socket_t _pool[SOCKET_POOL_SIZE];
mutex_t _pool_mutex = MUTEX_INIT; mutex_t _pool_mutex = MUTEX_INIT;
const struct sockaddr_in6 in6addr_any = {AF_INET6, 0, 0, IN6ADDR_ANY_INIT, 0}; const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT;
const struct sockaddr_in6 in6addr_loopback = { const struct in6_addr in6addr_loopback = IN6ADDR_LOOPBACK_INIT;
AF_INET6, 0, 0, IN6ADDR_LOOPBACK_INIT, 0
};
static socket_t *_get_free_socket(void) static socket_t *_get_free_socket(void)
{ {