.ai_family expects an address family, not a protocol family.
Note that on most platforms these constants are the same, so this
is purely cosmetic.
struct addrinfo ai_hints = {
.ai_flags = AI_ADDRCONFIG,
- .ai_family = PF_UNSPEC,
+ .ai_family = AF_UNSPEC,
.ai_protocol = IPPROTO_TCP,
.ai_socktype = SOCK_STREAM
};
port = MBMON_DEF_PORT;
struct addrinfo ai_hints = {
- .ai_family = PF_UNSPEC,
+ .ai_family = AF_UNSPEC,
.ai_flags = AI_ADDRCONFIG,
.ai_protocol = IPPROTO_TCP,
.ai_socktype = SOCK_STREAM
port = NTPD_DEFAULT_PORT;
struct addrinfo ai_hints = {
- .ai_family = PF_UNSPEC,
+ .ai_family = AF_UNSPEC,
.ai_flags = AI_ADDRCONFIG,
.ai_protocol = IPPROTO_UDP,
.ai_socktype = SOCK_DGRAM
FILE *fh;
struct addrinfo ai_hints = {
- .ai_family = PF_UNSPEC,
+ .ai_family = AF_UNSPEC,
.ai_flags = AI_ADDRCONFIG,
.ai_protocol = IPPROTO_TCP,
.ai_socktype = SOCK_STREAM