From 0a5ac52b494453cd3687b0a424fd068ba8673033 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Fri, 30 Oct 2009 18:20:17 +0000 Subject: [PATCH] Header inclusion depending on HAVE_* symbol. Fix two typos. --- ares/ares_parse_txt_reply.c | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) diff --git a/ares/ares_parse_txt_reply.c b/ares/ares_parse_txt_reply.c index 6b0a78735..6a83b0709 100644 --- a/ares/ares_parse_txt_reply.c +++ b/ares/ares_parse_txt_reply.c @@ -19,21 +19,34 @@ #include "setup.h" -#if defined(WIN32) && !defined(WATT32) -#include "nameser.h" -#else -#include -#include -#include -#include -#include -#ifdef HAVE_ARPA_NAMESER_COMPAT_H -#include +#ifdef HAVE_SYS_SOCKET_H +# include #endif +#ifdef HAVE_NETINET_IN_H +# include +#endif +#ifdef HAVE_NETDB_H +# include +#endif +#ifdef HAVE_ARPA_INET_H +# include +#endif +#ifdef HAVE_ARPA_NAMESER_H +# include +#else +# include "nameser.h" +#endif +#ifdef HAVE_ARPA_NAMESER_COMPAT_H +# include +#endif + +#ifdef HAVE_STRINGS_H +# include #endif #include #include + #include "ares.h" #include "ares_dns.h" #include "ares_private.h" @@ -168,9 +181,9 @@ ares_parse_txt_reply (const unsigned char *abuf, int alen, rr_name = NULL; } - if (hostname); + if (hostname) free (hostname); - if (rr_name); + if (rr_name) free (rr_name); /* clean up on error */