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

Fix compilation on systems that do not define HOST_NAME_MAX #9127

Merged
merged 1 commit into from Jun 2, 2020

Conversation

rgacogne
Copy link
Member

@rgacogne rgacogne commented May 19, 2020

Short description

On FreeBSD at least, HOST_NAME_MAX is not defined and we need to use sysconf() to get the value at runtime instead.
Based on a work done by @RvdE to make the recursor compile on FreeBSD (many thanks!).

This PR generalizes the work done in #9125 to cover the authoritative server and dnsdist as well.

Checklist

I have:

  • read the CONTRIBUTING.md document
  • compiled this code
  • tested this code
  • included documentation (including possible behaviour changes)
  • documented the code
  • added or modified regression test(s)
  • added or modified unit test(s)

pdns/misc.cc Show resolved Hide resolved
@zeha
Copy link
Collaborator

zeha commented May 26, 2020

This is also a problem on macOS :)

@rgacogne rgacogne added this to the dnsdist-1.5.0 milestone May 29, 2020
On FreeBSD at least, HOST_NAME_MAX is not defined and we need to
use sysconf() to get the value at runtime instead.
Based on a work done by @RvdE to make the recursor compile on
FreeBSD (many thanks!).
@rgacogne rgacogne force-pushed the fix-gethostname-no-hostnamemax branch from 4c990a1 to 64d3823 Compare Jun 2, 2020
@rgacogne rgacogne merged commit 07f37f2 into PowerDNS:master Jun 2, 2020
24 checks passed
@rgacogne rgacogne deleted the fix-gethostname-no-hostnamemax branch Jun 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants