I have included the header netdb.h, where getaddrinfo is included, but gcc issues this warning:
netdb.h
getaddrinfo
warning: Using \'getaddrinfo\' in s
glibc uses libnss to support a number of different providers for address resolution services. Unfortunately, you cannot statically link libnss, as exactly what providers it loads depends on the local system's configuration.