From: Vladimír Čunát Date: Mon, 21 Oct 2019 12:32:51 +0000 (+0200) Subject: tweak conditionals to work with knot 3.0.dev X-Git-Tag: v4.3.0~17^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9c7e5965a048d845751c964bcc68ed94e0b381a8;p=thirdparty%2Fknot-resolver.git tweak conditionals to work with knot 3.0.dev I didn't plan this well ahead :-/ --- diff --git a/lib/cache/entry_rr.c b/lib/cache/entry_rr.c index f6d9168ad..ecb358abd 100644 --- a/lib/cache/entry_rr.c +++ b/lib/cache/entry_rr.c @@ -59,7 +59,7 @@ static int rdataset_materialize(knot_rdataset_t * restrict rds, const uint8_t * /* TODO: we might overrun here already, but we need to trust cache anyway...*/ const uint32_t rds_size = rdataset_dematerialized_size(d, &rds->count); d += KR_CACHE_RR_COUNT_SIZE; - #if KNOT_VERSION_MINOR >= 9 + #if KNOT_VERSION_HEX >= 0x020900 rds->size = rds_size; #endif if (d + rds_size > data_bound) { diff --git a/lib/zonecut.h b/lib/zonecut.h index 4de4087c0..e2eb553e1 100644 --- a/lib/zonecut.h +++ b/lib/zonecut.h @@ -23,7 +23,7 @@ /* TMP: compatibility for using libknot 2.8 API with 2.9. */ -#if KNOT_VERSION_MINOR >= 9 +#if KNOT_VERSION_HEX >= 0x020900 static inline size_t knot_rdataset_size(const knot_rdataset_t *rrs) { return rrs->size; diff --git a/modules/edns_keepalive/edns_keepalive.c b/modules/edns_keepalive/edns_keepalive.c index 75767ca7e..3a62b9119 100644 --- a/modules/edns_keepalive/edns_keepalive.c +++ b/modules/edns_keepalive/edns_keepalive.c @@ -37,7 +37,7 @@ static int edns_keepalive_finalize(kr_layer_t *ctx) req->qsource.flags.tcp && src_opt != NULL && knot_edns_get_option(src_opt, KNOT_EDNS_OPTION_TCP_KEEPALIVE - #if KNOT_VERSION_MINOR >= 9 + #if KNOT_VERSION_HEX >= 0x020900 , NULL #endif ) && diff --git a/modules/nsid/nsid.c b/modules/nsid/nsid.c index fee2da1e1..67263a463 100644 --- a/modules/nsid/nsid.c +++ b/modules/nsid/nsid.c @@ -31,7 +31,7 @@ static int nsid_finalize(kr_layer_t *ctx) { return ctx->state; const uint8_t *req_nsid = knot_edns_get_option(src_opt, KNOT_EDNS_OPTION_NSID - #if KNOT_VERSION_MINOR >= 9 + #if KNOT_VERSION_HEX >= 0x020900 , NULL #endif );