common.c:150:17: error: ‘const struct sockaddr_in6’ has no member named ‘sa_family’
这是我从客户端解决传入IPv6解析时遇到的错误。 请建议
答案 0 :(得分:1)
答案 1 :(得分:0)
struct sockaddr_in6 {
sa_family_t sin6_family; /* AF_INET6 */
in_port_t sin6_port; /* port number */
uint32_t sin6_flowinfo; /* IPv6 flow information */
struct in6_addr sin6_addr; /* IPv6 address */
uint32_t sin6_scope_id; /* Scope ID (new in 2.4) */
};
sa_family
成员不存在,您应该将其替换为sin6_family