summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2012-09-27 22:00:55 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2012-09-27 22:00:55 +0100
commit6abc190a70df97fc85e53192a62a61981c77fede (patch)
tree1d270bec965dddb18c883308d1c9fc15d1cb6265 /src
parent5b0cf78827576e3a004dffdbc0bab1094a331612 (diff)
Unbreak non-ipv6 build.
My commit 3a7963704c519 broke compilation without HAVE_IPv6. Rework.
Diffstat (limited to 'src')
-rw-r--r--src/src/lookups/dnsdb.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/src/lookups/dnsdb.c b/src/src/lookups/dnsdb.c
index ec1cd159a..a8eab2e47 100644
--- a/src/src/lookups/dnsdb.c
+++ b/src/src/lookups/dnsdb.c
@@ -296,19 +296,21 @@ while ((domain = string_nextinlist(&keystring, &sep, buffer, sizeof(buffer)))
the final "nothing found" result, but carry on to the next domain. */
found = domain;
+#if HAVE_IPV6
if (type == T_APL) /* NB cannot happen unless HAVE_IPV6 */
{
-#if HAVE_IPV6 && defined(SUPPORT_A6)
- if (searchtype == T_APL) searchtype = T_A6;
-#endif
-#if HAVE_IPV6 && !defined(SUPPORT_A6)
- if (searchtype == T_APL) searchtype = T_AAAA;
-#endif
+ if (searchtype == T_APL)
+# if defined(SUPPORT_A6)
+ searchtype = T_A6;
+# else
+ searchtype = T_AAAA;
+# endif
else if (searchtype == T_A6) searchtype = T_AAAA;
else if (searchtype == T_AAAA) searchtype = T_A;
rc = dns_special_lookup(&dnsa, domain, searchtype, &found);
}
else
+#endif
rc = dns_special_lookup(&dnsa, domain, type, &found);
if (rc == DNS_NOMATCH || rc == DNS_NODATA) continue;