DKIM: reinstate embedded Polarssl SHA routines under older GnuTLS. Bug 1772
[exim.git] / src / src / dns.c
index 9859e83658839600f42df07a7595575194a8f136..e6e4fb6b3e7708b4bc4b1f3fe39293e28e644923 100644 (file)
@@ -483,8 +483,10 @@ return TRUE;
 static void
 dns_set_insecure(dns_answer * dnsa)
 {
+#ifndef DISABLE_DNSSEC
 HEADER * h = (HEADER *)dnsa->answer;
 h->ad = 0;
+#endif
 }
 
 /************************************************
@@ -496,7 +498,11 @@ h->ad = 0;
 BOOL
 dns_is_aa(const dns_answer *dnsa)
 {
+#ifdef DISABLE_DNSSEC
+return FALSE;
+#else
 return ((HEADER*)dnsa->answer)->aa;
+#endif
 }
 
 
@@ -558,7 +564,7 @@ dns_return(const uschar * name, int type, int rc)
 res_state resp = os_get_dns_resolver_res();
 tree_node *node = store_get_perm(sizeof(tree_node) + 290);
 sprintf(CS node->name, "%.255s-%s-%lx", name, dns_text_type(type),
-  resp->options);
+  (unsigned long) resp->options);
 node->data.val = rc;
 (void)tree_insertnode(&tree_dns_fails, node);
 return rc;
@@ -607,7 +613,7 @@ have many addresses in the same domain. We rely on the resolver and name server
 caching for successful lookups. */
 
 sprintf(CS node_name, "%.255s-%s-%lx", name, dns_text_type(type),
-  resp->options);
+  (unsigned long) resp->options);
 previous = tree_search(tree_dns_fails, node_name);
 if (previous != NULL)
   {
@@ -620,7 +626,7 @@ if (previous != NULL)
   return previous->data.val;
   }
 
-#ifdef EXPERIMENTAL_INTERNATIONAL
+#ifdef SUPPORT_I18N
 /* Convert all names to a-label form before doing lookup */
   {
   uschar * alabel;
@@ -851,7 +857,7 @@ for (i = 0; i < 10; i++)
     if (  rr_name
        && Ustrcmp(rr_name, *fully_qualified_name) != 0
        && rr_name[0] != '*'
-#ifdef EXPERIMENTAL_INTERNATIONAL
+#ifdef SUPPORT_I18N
        && (  !string_is_utf8(*fully_qualified_name)
          || Ustrcmp(rr_name,
               string_domain_utf8_to_alabel(*fully_qualified_name, NULL)) != 0
@@ -1146,7 +1152,7 @@ else
     {
     struct in6_addr in6;
     int i;
-    for (i = 0; i < 16; i++) in6.__in6_u.__u6_addr8[i] = rr->data[i];
+    for (i = 0; i < 16; i++) in6.s6_addr[i] = rr->data[i];
     yield = store_get(sizeof(dns_address) + 50);
     inet_ntop(AF_INET6, &in6, CS yield->address, 50);
     yield->next = NULL;