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 | db80e18308e40d3ef7f0f711be2de1ae23a34242 (patch) | |
tree | 5db2acdb2d9a85db4927ddf7d1abc5f5393199ab /ares/ares__get_hostent.c | |
parent | 3081207a4c5c63c8fa609295ff5941f33b26f1cb (diff) |
include header file only when available
Diffstat (limited to 'ares/ares__get_hostent.c')
-rw-r--r-- | ares/ares__get_hostent.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/ares/ares__get_hostent.c b/ares/ares__get_hostent.c index cea95aed7..40dad5d56 100644 --- a/ares/ares__get_hostent.c +++ b/ares/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> |