diff options
Diffstat (limited to 'ares__get_hostent.c')
-rw-r--r-- | ares__get_hostent.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/ares__get_hostent.c b/ares__get_hostent.c index 298df09..4497d60 100644 --- a/ares__get_hostent.c +++ b/ares__get_hostent.c @@ -1,5 +1,5 @@ -/* Copyright 1998, 2010 by the Massachusetts Institute of Technology. +/* Copyright 1998, 2011 by the Massachusetts Institute of Technology. * * Permission to use, copy, modify, and distribute this * software and its documentation for any purpose and without @@ -16,9 +16,6 @@ #include "ares_setup.h" -#ifdef HAVE_SYS_SOCKET_H -# include <sys/socket.h> -#endif #ifdef HAVE_NETINET_IN_H # include <netinet/in.h> #endif @@ -30,7 +27,8 @@ #endif #include "ares.h" -#include "inet_net_pton.h" +#include "ares_inet_net_pton.h" +#include "ares_nowarn.h" #include "ares_private.h" int ares__get_hostent(FILE *fp, int family, struct hostent **host) @@ -219,8 +217,8 @@ int ares__get_hostent(FILE *fp, int family, struct hostent **host) break; /* Copy actual network address family and length. */ - hostent->h_addrtype = addr.family; - hostent->h_length = (int)addrlen; + hostent->h_addrtype = aresx_sitoss(addr.family); + hostent->h_length = aresx_uztoss(addrlen); /* Free line buffer. */ free(line); |