diff options
author | Yang Tse <yangsita@gmail.com> | 2008-09-15 17:14:29 +0000 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2008-09-15 17:14:29 +0000 |
commit | f2582d69495d9b418d096d14f9db205b004a49c3 (patch) | |
tree | 31abd504060626baa78a77bc72c01d5bb778bca0 /ares__get_hostent.c | |
parent | 746f3e2942c36511fda867cac0573d2907290db0 (diff) | |
download | c-ares-f2582d69495d9b418d096d14f9db205b004a49c3.tar.gz c-ares-f2582d69495d9b418d096d14f9db205b004a49c3.tar.bz2 c-ares-f2582d69495d9b418d096d14f9db205b004a49c3.zip |
include header file only when available
Diffstat (limited to 'ares__get_hostent.c')
-rw-r--r-- | ares__get_hostent.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ares__get_hostent.c b/ares__get_hostent.c index cea95ae..40dad5d 100644 --- a/ares__get_hostent.c +++ b/ares__get_hostent.c @@ -18,11 +18,19 @@ #include "setup.h" #if !defined(WIN32) || defined(WATT32) +#ifdef HAVE_SYS_SOCKET_H #include <sys/socket.h> +#endif +#ifdef HAVE_NETINET_IN_H #include <netinet/in.h> -#include <arpa/inet.h> +#endif +#ifdef HAVE_NETDB_H #include <netdb.h> #endif +#ifdef HAVE_ARPA_INET_H +#include <arpa/inet.h> +#endif +#endif #include <stdio.h> #include <stdlib.h> |