mirror of
https://github.com/monero-project/monero.git
synced 2025-08-13 22:05:36 -04:00
common: make this build with unbound 1.4.20
Common on currently used distros
This commit is contained in:
parent
8361d60aef
commit
a9cc88ee76
2 changed files with 5 additions and 2 deletions
|
@ -527,7 +527,10 @@ std::string get_nix_version_display_string()
|
|||
{
|
||||
ub_ctx *ctx = ub_ctx_create();
|
||||
if (!ctx) return false; // cheat a bit, should not happen unless OOM
|
||||
ub_ctx_zone_add(ctx, "monero", "unbound"); // this calls ub_ctx_finalize first, then errors out with UB_SYNTAX
|
||||
char *monero = strdup("monero"), *unbound = strdup("unbound");
|
||||
ub_ctx_zone_add(ctx, monero, unbound); // this calls ub_ctx_finalize first, then errors out with UB_SYNTAX
|
||||
free(unbound);
|
||||
free(monero);
|
||||
// if no threads, bails out early with UB_NOERROR, otherwise fails with UB_AFTERFINAL id already finalized
|
||||
bool with_threads = ub_ctx_async(ctx, 1) != 0; // UB_AFTERFINAL is not defined in public headers, check any error
|
||||
ub_ctx_delete(ctx);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue