nsd
nsd copied to clipboard
Check for __b64_pton and __b64_ntop existence and declaration.
If present, and the non-underscore versions don't exist, define to b64_pton and b64_ntop. These functions are usually defined in resolv.h, which nsd does not include, so use the prototype in config.h if needed.
Hi @millert! Thanks for the PR. Seems resolv.h
, at least on Linux, defines b64_xtox
to __b64_xtox
too, so mostly looks fine to me. Can you elaborate on what system doesn't have that define? That sort of info helps to understand why this is good to merge. Also, you use AC_CHECK_DECLS
to test for the b64_xtox
symbols, but as b64_xtox
is always defined to the underscore version, that check must always fail right?
For my own reference (maybe you're interested too, it states why resolv.h
isn't included):
It seems someone else tried to improve the situation as well: https://lists.nlnetlabs.nl/pipermail/nsd-users/2015-September/002174.html
I'll have to read a bit more before I can determine if this is a correct fix.
I don't know of any systems that have the non-underscore versions that do not also have the underscore version. For instance, Solaris has both (one is a weak ref) in its libresolv but not in libc. Only checking for the underscore version would simplify configure a bit.
@millert, what system are you using that is currently having problems building NSD (so that I can test and verify)? And, are you experiencing the same problem that's outlined in the post? i.e. are the versions in compat
being compiled and used as opposed to the implementation on your system (The post is from 2015 and that part of configure.ac
hasn't been updated since 2013)?
The old post in nsd-users suggests using the underscore versions, but simply updating the check to actually compile code might work(?)
FYI: It also just so happens that we're in the process of creating a better zone parser all together (simdzone).