>>>>> "Nico" == Nico Golde <[EMAIL PROTECTED]> writes: >>>>> "Nico" == Nico Golde <[EMAIL PROTECTED]> writes: Nico> David Bremner <[EMAIL PROTECTED]> [2008-03-22 02:37]: >> There seems to be a bug in the configuration/build process. I >> just grab the source and build on a more or less up to date >> sid, and HOSTNAMES is defined to 0, even though >> --enable-hostnames is passed to configure.
Nico> That does not explain it because I tried it with 1.8beta5-9. Yeah, it's a puzzle. The following code, copied from common.c works fine on my host. #include <netdb.h> #include <stdio.h> #include <arpa/inet.h> #include <netinet/in.h> #include <sys/socket.h> int main(int argc, char** argv){ char *host="localhost"; struct hostent *new; struct in_addr *ip; unsigned int hostaddr; if ((new = gethostbyname(host)) == (struct hostent *) 0) { return(-1); } else { ip = ((struct in_addr *) * new->h_addr_list); hostaddr = ip -> s_addr; printf("Connecting to %s...\n", inet_ntoa(*ip)); } return 0; } -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]