146
146
struct addrinfo hints, *ai;
148
157
memset(&hints, 0, sizeof(hints));
149
158
hints.ai_socktype = SOCK_DGRAM;
150
159
hints.ai_flags = AI_NUMERICHOST;
152
if (getaddrinfo(hostname, "0", &hints, &ai) == 0) {
161
if (getaddrinfo(hostname, NULL, &hints, &ai) == 0) {