mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 10:18:25 +00:00
Replace ad-hoc libnettle version detecion with MIN_VERSION macro.
This commit is contained in:
@@ -124,10 +124,8 @@ const struct nettle_hash *hash_find(char *name)
|
|||||||
|
|
||||||
/* libnettle >= 3.4 provides nettle_lookup_hash() which avoids nasty ABI
|
/* libnettle >= 3.4 provides nettle_lookup_hash() which avoids nasty ABI
|
||||||
incompatibilities if sizeof(nettle_hashes) changes between library
|
incompatibilities if sizeof(nettle_hashes) changes between library
|
||||||
versions. It also #defines nettle_hashes, so use that to tell
|
versions. */
|
||||||
if we have the new facilities. */
|
#if MIN_VERSION(3, 4)
|
||||||
|
|
||||||
#ifdef nettle_hashes
|
|
||||||
return nettle_lookup_hash(name);
|
return nettle_lookup_hash(name);
|
||||||
#else
|
#else
|
||||||
{
|
{
|
||||||
@@ -180,7 +178,7 @@ int hash_init(const struct nettle_hash *hash, void **ctxp, unsigned char **diges
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif /* defined(HAVE_DNSSEC) || defined(HAVE_CRYPTOHASH) */
|
||||||
|
|
||||||
#ifdef HAVE_DNSSEC
|
#ifdef HAVE_DNSSEC
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user