I have included the header netdb.h, where getaddrinfo is included, but gcc issues this warning:
netdb.h
getaddrinfo
warning: Using \'getaddrinfo\' in s
I think certain features are dependent on the dynamic loader to work things out at run time. static linking is no longer practical unfortunately http://people.redhat.com/drepper/no_static_linking.html