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

Allow use of libbsd functions with configure option --with-libbsd #154

merged 2 commits into from Jan 27, 2020


Copy link

@edmonds edmonds commented Jan 27, 2020


This pull request is for a patch developed by @stevenc99 and shipped in the Debian package of unbound ≥ 1.6.4. It adds a --with-libbsd configure option for using some functions shipped in the libbsd library rather than the implementations in unbound's compat/ directory. We meant to submit this patch upstream back in 2017 but it looks like that never happened.

There are further details here:

I've refreshed the patch so that it is up-to-date with the Unbound master branch.


Add a new configure option `--with-libbsd', which allows to use libbsd's
portable implementations of:

    strlcpy strlcat arc4random arc4random_uniform reallocarray

instead of the embedded code copies in contrib/, which will be
difficult to maintain in the long term.

Also patch util/random.c so that, when building with libbsd and without
OpenSSL, arc4random can still be used as the PRNG.  Otherwise, building
with libnettle would need a kernel-specific getentropy implementation,
and libbsd does not export one.

[ Imported patch description from BTS, refreshed
patch against Unbound 1.9.6.]
@ralphdolmans ralphdolmans self-assigned this Jan 27, 2020
Copy link

ralphdolmans commented Jan 27, 2020

Great, thanks!

Resolved merge conflict on, from PR#155 changes.

@ralphdolmans ralphdolmans merged commit 6b3df09 into NLnetLabs:master Jan 27, 2020
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

3 participants