Best way to get version in old libunbounds?

Felipe Gasper felipe at felipegasper.com
Thu Feb 13 16:29:22 UTC 2020



> On Feb 13, 2020, at 11:23 AM, Wouter Wijngaards via Unbound-users <unbound-users at lists.nlnetlabs.nl> wrote:
> 
> Hi Felipe,
> 
> On 2/13/20 5:17 PM, Felipe Gasper via Unbound-users wrote:
>> Hello,
>> 
>> I’ve noticed that UNBOUND_VERSION_MAJOR and friends aren’t defined in some older libunbound installs.
>> 
>> Is there any reliable way to get the libunbound version in those older versions from C?
> 
> For 1.4.15 and later there is ub_version().  Before that, no version
> information, don't know if you can create a request for version.server
> CH TXT and then the library tells you, if that works.  Or test for
> features, or unbound -h output. (unbound -V nowadays).

Thank you for such a fast response!

I do need the version in the preprocessor, but I think I can wrestle a solution out of ub_version().

-FG


More information about the Unbound-users mailing list