summaryrefslogtreecommitdiffstats
path: root/src/resolv
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2011-06-16 17:14:53 +0200
committerStephen Gallagher <sgallagh@redhat.com>2011-06-16 18:15:35 -0400
commitfde4194a9bc18932c6cfdc44e69a4376feb26208 (patch)
tree0e0f2330dbb4c0f8dcabb3969d3bdb28efb244f3 /src/resolv
parenta950b3f31ec88e40e40a28e0902baf92a6b57e03 (diff)
downloadsssd-fde4194a9bc18932c6cfdc44e69a4376feb26208.tar.gz
sssd-fde4194a9bc18932c6cfdc44e69a4376feb26208.tar.xz
sssd-fde4194a9bc18932c6cfdc44e69a4376feb26208.zip
Provide TTL structure names for c-ares < 1.7
https://fedorahosted.org/sssd/ticket/898 In c-ares 1.7, the upstream renamed the addrttl/addr6ttl structures to ares_addrttl/ares_addr6ttl so they are in the ares_ namespace. Because they are committed to stable ABI, the contents are the same, just the name changed -- so it is safe to just #define the new name for older c-ares version in case the new one is not detected in configure time.
Diffstat (limited to 'src/resolv')
-rw-r--r--src/resolv/async_resolv.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/resolv/async_resolv.c b/src/resolv/async_resolv.c
index c05628a35..1f8056722 100644
--- a/src/resolv/async_resolv.c
+++ b/src/resolv/async_resolv.c
@@ -53,6 +53,14 @@
_ares_malloc_data(data)
#endif /* HAVE_ARES_DATA */
+#ifndef HAVE_STRUCT_ARES_ADDRTTL
+#define ares_addrttl addrttl
+#endif
+
+#ifndef HAVE_STRUCT_ARES_ADDR6TTL
+#define ares_addr6ttl addr6ttl
+#endif
+
#define DNS__16BIT(p) (((p)[0] << 8) | (p)[1])
#define DNS_HEADER_ANCOUNT(h) DNS__16BIT((h) + 6)