summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
Diffstat (limited to 'source4')
-rw-r--r--source4/libcli/resolve/dns_ex.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/libcli/resolve/dns_ex.c b/source4/libcli/resolve/dns_ex.c
index 948ad9f134..17e7aad290 100644
--- a/source4/libcli/resolve/dns_ex.c
+++ b/source4/libcli/resolve/dns_ex.c
@@ -278,7 +278,11 @@ static void run_child_getaddrinfo(struct dns_ex_state *state, int fd)
hints.ai_flags = AI_ADDRCONFIG | AI_NUMERICSERV;
ret = getaddrinfo(state->name.name, "0", &hints, &res_list);
+#if defined(EAI_NODATA) && (EAI_NODATA != EAI_NONAME)
if (ret == EAI_NODATA && state->do_fallback) {
+#else
+ if (ret == EAI_NONAME && state->do_fallback) {
+#endif
/* getaddrinfo() doesn't handle CNAME records */
run_child_dns_lookup(state, fd);
return;