Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for __b64_pton and __b64_ntop existence and declaration. #291

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

millert
Copy link
Contributor

@millert millert commented Sep 7, 2023

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.

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.
@k0ekk0ek
Copy link
Contributor

k0ekk0ek commented Sep 8, 2023

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.

@millert
Copy link
Contributor Author

millert commented Sep 8, 2023

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.

@k0ekk0ek
Copy link
Contributor

@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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants