Build against bind 9.18.43 fails with:
bind
9.18.43
In file included from bindcfg.h:10, from ldap_driver.c:39: util.h:45:9: error: "CHECK" redefined [-Werror] 45 | #define CHECK(op) \ | ^~~~~ In file included from /usr/include/bind9/isc/atomic.h:22, from /usr/include/bind9/isc/types.h:16, from /usr/include/bind9/isc/region.h:19, from /usr/include/bind9/isc/buffer.h:111, from ldap_driver.c:11: /usr/include/bind9/isc/util.h:353:9: note: this is the location of the previous definition 353 | #define CHECK(r) \ | ^~~~~ cc1: all warnings being treated as errors
Related change: https://gitlab.isc.org/isc-projects/bind9/-/merge_requests/11080
@slev thanks. Will you provide a fix? I'm on vacation and not always near my computer.
bind's version of CHECK: https://gitlab.isc.org/isc-projects/bind9/-/blob/bind-9.18/lib/isc/include/isc/util.h?ref_type=heads#L353-L358
CHECK
#define CHECK(r) \ do { \ result = (r); \ if (result != ISC_R_SUCCESS) \ goto cleanup; \ } while (0)
differs from this project's one: https://pagure.io/bind-dyndb-ldap/blob/master/f/src/util.h#_45
#define CHECK(op) \ do { \ result = (op); \ if (result != ISC_R_SUCCESS) { \ if (verbose_checks == true) \ log_error_position("check failed: %s", \ dns_result_totext(result)); \ goto cleanup; \ } \ } while (0)
which proposes additional logging feature.
So probably the local version is preferred:
diff --git a/src/util.h b/src/util.h index 5da0f5c..f453a38 100644 --- a/src/util.h +++ b/src/util.h @@ -42,6 +42,7 @@ extern bool verbose_checks; /* from settings.c */ goto cleanup; \ } while(0) +#undef CHECK #define CHECK(op) \ do { \ result = (op); \
If you are fine with the approach, I can open oneliner PR.
Yeah, sounds good. Could you please add some explanation to the commit message as well?
PR: https://pagure.io/bind-dyndb-ldap/pull-request/244
Metadata Update from @slev: - Issue close_status updated to: fixed - Issue status updated to: Closed (was: Open)
Log in to comment on this ticket.