gethostbyname h_addr_list inet_ntoa nsswitch.conf

gethostbyname example that compiles and runs clean on puias6

While playing around with getting host entries to work with ldap, I found that my previous code for using gethostbyname was not running clean on puias6. Here is an updated version


#include
#include
#include
#include
#include
#include

int main(int argc, char **argv) {
int i;

Wordpress category: