#include #include #include #include #include #include #include int main() { for (;;) { int fd = open("/dev/null", O_RDONLY); if (fd == -1) { } struct addrinfo *res; struct addrinfo hints; hints.ai_flags = AI_CANONNAME | AI_V4MAPPED | AI_ALL; char *h = "example.com"; int ret = getaddrinfo(h, NULL, &hints, &res); if (ret != 0) { fprintf(stderr, "getaddrinfo: %d, %d\n", ret, errno); } else { freeaddrinfo(ret); } } return 0; }