]> git.ipfire.org Git - thirdparty/unbound.git/commit
Allow use of libbsd functions with configure option --with-libbsd
authorSteven Chamberlain <steven@pyro.eu.org>
Thu, 16 Feb 2017 12:37:41 +0000 (12:37 +0000)
committerRobert Edmonds <edmonds@mycre.ws>
Mon, 27 Jan 2020 00:09:43 +0000 (19:09 -0500)
commitf6b4f2a14918c96c3c3f5e35775e3edf4418ef24
treef60f329698a1ac5d6a4f7e7b118d5ff111bb6d99
parentff92edcd410610e0f506e4daf0ffbad58ed01760
Allow use of libbsd functions with configure option --with-libbsd

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.

[edmonds@debian.org: Imported patch description from BTS, refreshed
patch against Unbound 1.9.6.]
configure.ac
contrib/libunbound.pc.in
util/random.c