diff options
author | Jeff Morriss <jeff.morriss.ws@gmail.com> | 2015-02-25 21:39:34 -0500 |
---|---|---|
committer | Jeff Morriss <jeff.morriss.ws@gmail.com> | 2015-02-26 02:44:50 +0000 |
commit | 4e12b598ebaead8947ed593ae41b3cddbbf68f9c (patch) | |
tree | b440ff85a128a7421d70f5fed6708b01ae0a68cd /epan/addr_resolv.c | |
parent | 0692d75455550ae6392a57c8323d8757a72f7dd2 (diff) |
Check whether we HAVE_GETADDRINFO before using it.
One spot was missing the check.
Change-Id: I72d1d3d2dec2cc71b02861ace59dc9e189721cfb
Reviewed-on: https://code.wireshark.org/review/7401
Reviewed-by: Jeff Morriss <jeff.morriss.ws@gmail.com>
Diffstat (limited to 'epan/addr_resolv.c')
-rw-r--r-- | epan/addr_resolv.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/addr_resolv.c b/epan/addr_resolv.c index 7148ce642e..5795fb06c9 100644 --- a/epan/addr_resolv.c +++ b/epan/addr_resolv.c @@ -3208,9 +3208,9 @@ get_host_ipaddr(const char *host, guint32 *addrp) int nfds; fd_set rfds, wfds; async_hostent_t ahe; -#else /* HAVE_C_ARES */ +#elif defined(HAVE_GETADDRINFO) struct addrinfo hint, *result = NULL; -#endif /* HAVE_C_ARES */ +#endif /* * don't change it to inet_pton(AF_INET), they are not 100% compatible. @@ -3257,7 +3257,7 @@ get_host_ipaddr(const char *host, guint32 *addrp) return TRUE; } return FALSE; -#else /* ! HAVE_C_ARES */ +#elif defined(HAVE_GETADDRINFO) /* * This can be slow, particularly for capture files with lots of * addresses. Should we just return FALSE instead? @@ -3276,7 +3276,7 @@ get_host_ipaddr(const char *host, guint32 *addrp) return ret_val; } } -#endif /* HAVE_C_ARES */ +#endif } else { /* Does the string really contain dotted-quad IP? * Check against inet_atons that accept strings such as |