# HG changeset patch # User aurel # Date 1218753365 0 # Node ID 81726233f9b371610783eb83df86ad478617f85f # Parent 68749aaea50fc4bb8bbf3f881889ebff2e94e460 use h_addr_list[0] instead of h_addr as this is the posix hostent field name diff -r 68749aaea50f -r 81726233f9b3 os_support.c --- a/os_support.c Thu Aug 14 22:01:59 2008 +0000 +++ b/os_support.c Thu Aug 14 22:36:05 2008 +0000 @@ -68,7 +68,7 @@ hp = gethostbyname(hostname); if (!hp) return -1; - memcpy(sin_addr, hp->h_addr, sizeof(struct in_addr)); + memcpy(sin_addr, hp->h_addr_list[0], sizeof(struct in_addr)); } return 0; }